fix: test_get_nonexistent_play returns 500 instead of 404 #109
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#109
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?
Integration test test_get_nonexistent_play (test_stratplay_routes.py:498) expects 404 for nonexistent play but gets 500. Endpoint throws unhandled exception instead of proper 404. Location: GET /api/v3/stratplay/{id} or similar.
Issue worker investigation: this bug is already fixed on
main.The fix was applied as part of PR #104:
215085b—app/dependencies.py: addedexcept HTTPException: raisebeforeexcept Exception, sohandle_db_errorsno longer swallows intentional 4xx responsesc49f91c—tests/integration/test_stratplay_routes.py: updated assertion from== 500to== 404app/routers_v3/stratplay/crud.py:get_one_playalready raisesHTTPException(status_code=404, detail=f"Play ID {play_id} not found")for missing plays — the detail passes"not found" in detail.lower()No code changes are needed. If the test is still failing, it's likely against a dev server that hasn't been redeployed since PR #104 merged. Closing as already resolved.