2.1 KiB
2.1 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 37cca1c8-7fbd-43c3-a289-129b1c530f9f | workflow | PR review: paper-dynasty-database#48 — replace broad except Exception with DoesNotExist (APPROVED) |
|
0.4 | 0.8 | 2026-03-04T01:18:04.266886+00:00 | 2026-03-04T01:18:04.686668+00:00 |
|
PR #48: fix: replace broad except Exception blocks with DoesNotExist (#15)
Verdict: APPROVED (could not post — Gitea blocks self-reviews on cal-owned repos)
Summary
- 71
except Exceptionblocks replaced withexcept peewee.DoesNotExistacross 19 router files inapp/routers_v2/ DoesNotExistimported into each file from..db_engine, which re-exports it viafrom peewee import *- Real DB errors now propagate as 500s instead of being swallowed as 404s
Key Findings
- Correctness: Change is mechanically correct.
DoesNotExistis peewee's standard exception forModel.get_by_id()misses. - Import validity:
db_engine.pyline 8 usesfrom peewee import *, soDoesNotExistis available in that namespace. All 19 import additions are valid. - Pre-existing minor issue: A few handlers use
except DoesNotExist as e:but don't includeein their log messages (e.g.,cards.pyv1_cards_wipe_team,results.pyget_team_results). Pre-existing, out of scope. - No security concerns. No style violations.
Note
Gitea raises "approve your own pull is not allowed" when the reviewer owns the repo. Self-review is blocked at the platform level — this is a known limitation for solo repos.