From 9e48616274a555f252633f8825fa678c1220e2c5 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Fri, 20 Mar 2026 18:01:48 -0500 Subject: [PATCH] fix: use logger.exception() in calculate_pitcher_ratings error handler Replaces logger.error() with logger.exception() so the full stack trace is captured when a pitcher card fails to generate, making it possible to diagnose the root cause rather than just seeing the error message. Closes #17 Co-Authored-By: Claude Sonnet 4.6 --- pitchers/creation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pitchers/creation.py b/pitchers/creation.py index 2ccd695..fa9fdd5 100644 --- a/pitchers/creation.py +++ b/pitchers/creation.py @@ -301,8 +301,10 @@ async def calculate_pitching_cards( "batting": f"#1W{df_data['pitch_hand']}-C", } ) - except Exception as e: - logger.error(f"Skipping fg ID {df_data['key_fangraphs']} due to: {e}") + except Exception: + logger.exception( + f"Skipping fg ID {df_data['key_fangraphs']} due to exception" + ) print("Calculating pitching cards...") pitching_stats.apply(create_pitching_card, axis=1)