From 1a3f8994a9982c83e964c6041f22b7a1c50a8380 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 7 Apr 2026 22:02:00 -0500 Subject: [PATCH] fix: add debug logging to silent badge lookup exception in get_card_embeds Replaces bare `except Exception: pass` with `logging.debug(..., exc_info=True)` so badge lookup failures are traceable in logs without affecting card display. Closes #150 Co-Authored-By: Claude Sonnet 4.6 --- helpers/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers/main.py b/helpers/main.py index bceeed9..2cae635 100644 --- a/helpers/main.py +++ b/helpers/main.py @@ -120,8 +120,10 @@ async def get_card_embeds(card, include_stats=False) -> list: tier = evo_state["current_tier"] badge = TIER_BADGES.get(tier) tier_badge = f"[{badge}] " if badge else "" - except Exception: - pass + except Exception as e: + logging.debug( + f"badge lookup failed for card {card.get('id')}: {e}", exc_info=True + ) embed = discord.Embed( title=f"{tier_badge}{card['player']['p_name']}", -- 2.25.1