Skip to content

Fix: Assigning task to non-existent project returns 500 instead of 400 #19

@hydraInsurgent

Description

@hydraInsurgent

TL;DR

Sending an invalid projectId to PATCH /api/tasks/{id}/project causes an unhandled 500 error instead of a proper validation response.

Current State

The endpoint saves without verifying the projectId exists. The FK constraint throws an unhandled exception.

Desired State

The endpoint should validate the projectId and return 400 Bad Request with a clear message if the project doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-lowNice to have, low urgency

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions