Skip to content

Draft: Add context=True parameter to registry error() for command error handlers#43

Draft
PenguinBoi12 wants to merge 1 commit intomainfrom
error-wrapper-handle-context
Draft

Draft: Add context=True parameter to registry error() for command error handlers#43
PenguinBoi12 wants to merge 1 commit intomainfrom
error-wrapper-handle-context

Conversation

@PenguinBoi12
Copy link
Copy Markdown
Contributor

Added context=True parameter to registry error() to support command-specific error handlers that receive the command context alongside the error. When context=True, the handler is registered in _command_error_handlers and called with (ctx, error), allowing replies and other context-aware operations. Requires a specific exception type — fallback command error handling should use the on_command_error lifecycle hook instead.

@PenguinBoi12 PenguinBoi12 changed the title Add context=True parameter to registry error() for command error handlers draft: Add context=True parameter to registry error() for command error handlers Apr 12, 2026
@PenguinBoi12 PenguinBoi12 changed the title draft: Add context=True parameter to registry error() for command error handlers Draft: Add context=True parameter to registry error() for command error handlers Apr 12, 2026
@PenguinBoi12 PenguinBoi12 force-pushed the error-wrapper-handle-context branch 5 times, most recently from e80a017 to 0d82ceb Compare April 12, 2026 08:51
@PenguinBoi12 PenguinBoi12 force-pushed the error-wrapper-handle-context branch from 0d82ceb to 4a312b7 Compare April 12, 2026 08:54
@PenguinBoi12 PenguinBoi12 marked this pull request as draft April 12, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant