Return normal responses instead of raising 200 HTTPExceptions #16
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#16
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Fixed in PR #47: #47
Replaced all 22 instances of
raise HTTPException(status_code=200, detail=...)withreturn {"message": ...}across 16 router files. Endpoints now return normal JSON responses for successful mutations instead of raising exceptions.