fix: season-stats update-game leaks SQL in 500 error for nonexistent game #113
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#113
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?
Description
POST /api/v2/season-stats/update-game/{game_id}with a nonexistent game_id returns a 500 with the raw Peewee SQL query and params in the error detail:Expected
Should catch
StratGame.DoesNotExistand return a clean 404:Location
app/routers_v2/season_stats.py— theexcept Exceptionblock on line 50 re-raises as 500 withstr(exc), which includes the SQL. Either catchDoesNotExistspecifically before the generic handler, or sanitize the message.Found during
Phase 1 smoke testing (2026-03-19)