fix: replace broad except Exception blocks with DoesNotExist (#15) #48

Merged
cal merged 1 commits from ai/paper-dynasty-database#15 into next-release 2026-03-07 03:18:57 +00:00

1 Commits

Author SHA1 Message Date
Cal Corum
0c042165b7 fix: replace broad except Exception blocks with DoesNotExist (#15)
Replace 71 broad `except Exception` blocks in 19 router files with the
specific `peewee.DoesNotExist` exception. GET endpoints that call
`Model.get_by_id()` now only catch the expected DoesNotExist error,
allowing real DB failures (connection errors, etc.) to propagate as
500s rather than being masked as 404s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 15:32:53 -06:00