Skip to content

Add guild and user context to autocomplete logs#10394

Open
vmphase wants to merge 1 commit intoRapptz:masterfrom
vmphase:feat/autocomplete-error-context
Open

Add guild and user context to autocomplete logs#10394
vmphase wants to merge 1 commit intoRapptz:masterfrom
vmphase:feat/autocomplete-error-context

Conversation

@vmphase
Copy link
Contributor

@vmphase vmphase commented Feb 1, 2026

Summary

This PR improves visibility when autocomplete fails or times out (e.g., 10062: Unknown interaction) by adding missing context to the logs, as discussed here.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@Rapptz
Copy link
Owner

Rapptz commented Feb 2, 2026

Please read the comment that you deleted. It's explicit that there is no exception or call to do this because this exception would be impossible to handle. If an exception's only purpose is to be logged and not handled then you might as well just log the exception (which is what the library does). While it's true that an error handler attached to a command should also be checking the exceptions it has received before actually being called, this implementation just calls on_error for that specific command whereas most logging calls are either on the tree or some other higher level handler.

I'd reconsider this PR if you just modified the logging call to have more information that was needed to address the original complaint. I just don't think this type of exception is good because it's not possible to handle outside of logging.

@vmphase vmphase force-pushed the feat/autocomplete-error-context branch from aed37dd to 3fbf728 Compare February 2, 2026 12:33
@vmphase vmphase changed the title Add AutocompleteError and include context in autocomplete logs Add guild and user context to autocomplete logs Feb 2, 2026
@vmphase
Copy link
Contributor Author

vmphase commented Feb 2, 2026

Thanks for the feedback. I've updated the PR, adding guild_id and user_id to logging for additional context.

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.

2 participants