Skip to content

[BACKEND] Validate task status filter values on list endpoint #467

@utksh1

Description

@utksh1

Problem

GET /api/v1/tasks?status=... accepts arbitrary status strings and returns an empty result for invalid values. This makes client bugs harder to diagnose and weakens the API contract.

Expected behavior

The endpoint should validate status against the known TaskStatus values and return a structured 400 error for invalid values.

Acceptance criteria

  • Validate the optional status query parameter before running the SQL query.
  • Return HTTP 400 with a clear message for invalid status values.
  • Add tests for valid and invalid status filters.

Metadata

Metadata

Labels

area:backendBackend API, database, or service worklevel:intermediate35 pts difficulty label for moderate contributor PRspriority:mediumImportant issue with normal urgencytype:bugBug fix work category bonus labeltype:testingTesting work category bonus label

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions