fix: add logging to silent error swallowing in badge lookup #150

Closed
opened 2026-04-08 00:23:54 +00:00 by cal · 0 comments
Owner

Problem

get_card_embeds() badge logic at helpers/main.py:117-124 uses bare except Exception: pass. All errors including API timeouts, malformed responses, and auth failures are completely invisible — no logging, no metrics.

While the silent catch is intentional (don't break card displays for badge failures), it makes debugging impossible.

Fix

Change except Exception: pass to except Exception: logger.debug(...) so badge lookup failures are traceable in logs without affecting player experience.

Impact

Trivial fix. Good debugging hygiene.

## Problem `get_card_embeds()` badge logic at `helpers/main.py:117-124` uses bare `except Exception: pass`. All errors including API timeouts, malformed responses, and auth failures are completely invisible — no logging, no metrics. While the silent catch is intentional (don't break card displays for badge failures), it makes debugging impossible. ## Fix Change `except Exception: pass` to `except Exception: logger.debug(...)` so badge lookup failures are traceable in logs without affecting player experience. ## Impact Trivial fix. Good debugging hygiene.
Claude added the
ai-working
label 2026-04-08 03:01:17 +00:00
Claude added
ai-pr-opened
and removed
ai-working
labels 2026-04-08 03:02:23 +00:00
cal closed this issue 2026-04-08 03:25:42 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#150
No description provided.