Replace broad except Exception blocks with specific exception types #15
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#15
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?
74 `except Exception` blocks across 19 files. In GET endpoints, the only expected error is `DoesNotExist`. Using `except Exception` masks database connection failures, import errors, etc., returning 404 instead of 500.
Priority: medium
Fixed in PR #48: #48
Replaced 71
except Exceptionblocks across all 19 router files withexcept DoesNotExist. AddedDoesNotExistto each file'sdb_engineimport (it's available viafrom peewee import *). Database connection errors and other unexpected exceptions will now correctly propagate as 500s rather than being masked as 404s.