paper-dynasty-discord/in_game
Cal Corum f62e08889f
All checks were successful
Ruff Lint / lint (pull_request) Successful in 27s
fix(gameplay): replace bare except with NoResultFound in cache-miss paths
In gameplay_queries.py, 10 try/except blocks used `except Exception:` to
detect SQLModel row-not-found cache misses (.one() returning no result).
This silently swallowed connection failures, attribute errors, and
programming bugs on the gameplay hot path.

Narrowed each handler to `except NoResultFound:` (sqlalchemy.exc).
Real errors now propagate instead of being misinterpreted as cache misses.

Refs: autonomous-pipeline finding analyst-2026-04-10-003
Category: stability / error_handling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:28:40 -05:00
..
ai_manager.py Add pitcher validation with rank retry in get_starting_pitcher 2026-01-30 14:04:03 -06:00
data_cache.py Update logging to RotatingFileHandler 2024-11-09 23:14:54 -06:00
game_helpers.py Helpers checks 2025-01-24 10:08:35 -06:00
gameplay_models.py fix: batch cleanup — dead code, bare excepts, empty stubs (#25, #32, #37, #38) 2026-03-22 23:23:09 -05:00
gameplay_queries.py fix(gameplay): replace bare except with NoResultFound in cache-miss paths 2026-04-10 10:28:40 -05:00
managerai_responses.py Batter subs plus cleanup 2024-12-23 10:09:11 -06:00
simulations.py Update api logging 2024-11-16 00:31:54 -06:00