mantimon-tcg/backend/app
Cal Corum 55e02ceb21 Replace silent error hiding with explicit failures
Three changes to fail fast instead of silently degrading:

1. GameService.create_game: Raise GameCreationError when energy card
   definition not found instead of logging warning and continuing.
   A deck with missing energy cards is fundamentally broken.

2. CardService.load_all: Collect all card file load failures and raise
   CardServiceLoadError at end with comprehensive error report. Prevents
   startup with partial card data that causes cryptic runtime errors.
   New exceptions: CardLoadError, CardServiceLoadError

3. GameStateManager.recover_active_games: Return RecoveryResult dataclass
   with recovered count, failed game IDs with error messages, and total.
   Enables proper monitoring and alerting for corrupted game state.

Tests added for energy card error case. Existing tests updated for
new RecoveryResult return type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:48:06 -06:00
..
api Fix medium priority issues from code review 2026-01-28 14:32:08 -06:00
core Implement GameService.execute_action enhancements (GS-003) 2026-01-29 15:15:34 -06:00
data Phase 3: Collections + Decks - Services and DI architecture 2026-01-28 11:27:14 -06:00
db Fix security and validation issues from code review 2026-01-28 14:16:07 -06:00
repositories Fix medium priority issues from code review 2026-01-28 14:32:08 -06:00
schemas Add Phase 4 WebSocket infrastructure (WS-001 through GS-001) 2026-01-28 22:21:20 -06:00
services Replace silent error hiding with explicit failures 2026-01-29 18:48:06 -06:00
socketio Refactor to dependency injection pattern - no monkey patching 2026-01-28 22:54:57 -06:00
__init__.py Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
config.py Fix security and validation issues from code review 2026-01-28 14:16:07 -06:00
main.py Add Phase 4 WebSocket infrastructure (WS-001 through GS-001) 2026-01-28 22:21:20 -06:00