fix: add missing logger to SubmitConfirmationModal #123
No reviewers
Labels
No Label
ai-changes-requested
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
in-next-release
status/in-progress
status/pr-open
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-v2#123
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/submit-modal-missing-logger"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SubmitConfirmationModal.on_submiterror handler referencedself.loggerbut__init__never set itAttributeErrorthat silently swallowed the real error — users saw nothing when/ilmovesubmission failedself.logger = get_contextual_logger(...)in__init__, importget_contextual_loggerTest plan
🤖 Generated with Claude Code
AI Code Review
Files Reviewed
views/transaction_embed.py(modified)Findings
Correctness
SubmitConfirmationModal.on_submitline 384 callsself.logger.error(...)inside the outerexcept Exceptionhandler, butself.loggerwas never set in__init__. Without this fix, any submission error triggers anAttributeErroronself.logger, which discord.py silently discards — the user sees nothing. The added assignment resolves this completely.get_contextual_loggerinserted afterimport discordand before the service imports.Security
Style & Conventions
self.logger = get_contextual_logger(f"{__name__}.SubmitConfirmationModal")matches the project-standard pattern documented inCLAUDE.mdexactly.SubmitConfirmationModalinherits directly fromdiscord.ui.Modalrather than the project'sBaseModal(which already initializes a logger). That's a pre-existing design choice — not introduced by this PR — and the inline fix is the minimal correct approach.Suggestions
SubmitConfirmationModalcould inherit fromBaseModalto get error handling, logging, and timeout handling for free. This is out of scope for a targeted bug fix.Verdict: COMMENT
Minimal, correct fix. Logger initialized using the project-standard pattern, 983/983 tests pass. No issues found.
Automated review by Claude PR Reviewer
Checkout
From your project repository, check out a new branch and test the changes.