Log and handle ZeroDivisionError in gauntlet draft #31

Closed
opened 2026-02-20 06:52:00 +00:00 by cal · 3 comments
Owner

cogs/players.py:998 and cogs/players_new/gauntlet.py:152 catch ZeroDivisionError and return with no logging, no user feedback, and no cleanup. User's interaction hangs or ends silently.

`cogs/players.py:998` and `cogs/players_new/gauntlet.py:152` catch `ZeroDivisionError` and `return` with no logging, no user feedback, and no cleanup. User's interaction hangs or ends silently.
cal added the
bug
label 2026-02-20 06:52:00 +00:00
cal added the
ai-working
label 2026-03-05 09:00:57 +00:00
cal added the
ai-working
label 2026-03-05 09:04:00 +00:00
cal removed the
ai-working
label 2026-03-05 09:05:12 +00:00
Author
Owner

PR #55 opened: #55

Added logger.info(f'User declined {this_event["name"]} draft - cancelling') to both except ZeroDivisionError handlers in cogs/players.py and cogs/players_new/gauntlet.py. The ZeroDivisionError is an intentional user-cancellation signal from gauntlets.py:664; user-facing feedback ("You'll be back") is already sent there, so only logging was missing.

PR #55 opened: https://git.manticorum.com/cal/paper-dynasty-discord/pulls/55 Added `logger.info(f'User declined {this_event["name"]} draft - cancelling')` to both `except ZeroDivisionError` handlers in `cogs/players.py` and `cogs/players_new/gauntlet.py`. The `ZeroDivisionError` is an intentional user-cancellation signal from `gauntlets.py:664`; user-facing feedback ("You'll be back") is already sent there, so only logging was missing.
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-05 09:05:26 +00:00
Author
Owner

PR included too many unrequested changes. Closed without prejudice

PR included too many unrequested changes. Closed without prejudice
cal removed the
ai-pr-opened
label 2026-03-10 14:12:59 +00:00
Claude added the
ai-working
ai-working
labels 2026-03-10 15:01:47 +00:00
Claude removed the
ai-working
label 2026-03-10 15:04:45 +00:00
Collaborator

Fixed in PR #85.

Both except ZeroDivisionError blocks now log the error, call gauntlets.wipe_team() for cleanup, and send the same user-facing error message as the except Exception blocks immediately below them.

Fixed in PR #85. Both `except ZeroDivisionError` blocks now log the error, call `gauntlets.wipe_team()` for cleanup, and send the same user-facing error message as the `except Exception` blocks immediately below them.
Claude added
ai-pr-opened
and removed
ai-working
labels 2026-03-10 15:05:02 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#31
No description provided.