Return normal responses instead of raising 200 HTTPExceptions #16

Open
opened 2026-02-20 06:52:31 +00:00 by cal · 1 comment
Owner

Across 20+ endpoints, `raise HTTPException(status_code=200, detail=...)` is used for successful mutations. Raising a 200 is semantically wrong and interferes with clients inspecting `exc.detail` for error handling.

Priority: medium

Across 20+ endpoints, \`raise HTTPException(status_code=200, detail=...)\` is used for successful mutations. Raising a 200 is semantically wrong and interferes with clients inspecting \`exc.detail\` for error handling. **Priority**: medium
cal added the
bug
tech-debt
labels 2026-02-20 06:52:31 +00:00
cal added the
ai-working
label 2026-03-04 00:31:14 +00:00
cal added the
ai-pr-opened
label 2026-03-04 00:35:04 +00:00
Author
Owner

Fixed in PR #47: #47

Replaced all 22 instances of raise HTTPException(status_code=200, detail=...) with return {"message": ...} across 16 router files. Endpoints now return normal JSON responses for successful mutations instead of raising exceptions.

Fixed in PR #47: https://git.manticorum.com/cal/paper-dynasty-database/pulls/47 Replaced all 22 instances of `raise HTTPException(status_code=200, detail=...)` with `return {"message": ...}` across 16 router files. Endpoints now return normal JSON responses for successful mutations instead of raising exceptions.
cal added
ai-failed
and removed
ai-working
labels 2026-03-04 00:35:15 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#16
No description provided.