Add type annotations to untyped path parameters #27

Closed
opened 2026-02-20 06:53:37 +00:00 by cal · 1 comment
Owner

Several endpoints accept path parameters without type hints: `players.py:598` (`player_id`), `players.py:1151` (`player_id`), `packs.py:119` (`pack_id`), `teams.py:178` (`team_id`). Without hints, FastAPI can't validate — invalid input causes unhandled DB errors instead of 422.

Priority: medium

Several endpoints accept path parameters without type hints: \`players.py:598\` (\`player_id\`), \`players.py:1151\` (\`player_id\`), \`packs.py:119\` (\`pack_id\`), \`teams.py:178\` (\`team_id\`). Without hints, FastAPI can't validate — invalid input causes unhandled DB errors instead of 422. **Priority**: medium
cal added the
bug
tech-debt
labels 2026-02-20 06:53:37 +00:00
cal added the
ai-working
label 2026-03-03 22:30:58 +00:00
Author
Owner

Fixed in PR #43: #43

Added int type annotations to all four untyped path parameters (get_one_player, delete_player, get_one_pack, get_one_team). FastAPI will now validate these and return 422 for non-integer inputs instead of propagating unhandled DB errors.

Fixed in PR #43: https://git.manticorum.com/cal/paper-dynasty-database/pulls/43 Added `int` type annotations to all four untyped path parameters (`get_one_player`, `delete_player`, `get_one_pack`, `get_one_team`). FastAPI will now validate these and return 422 for non-integer inputs instead of propagating unhandled DB errors.
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-03 22:33:35 +00:00
cal closed this issue 2026-03-10 18:26:27 +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#27
No description provided.