Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

feat: Include author context in Sentry error reports #698

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions naff/ext/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ async def on_error(self, event: Error) -> None:
"message": event.ctx.message,
},
)
if event.ctx.author:
scope.set_user({"id": event.ctx.author.id, "username": event.ctx.author.tag})
sentry_sdk.capture_exception(event.error)


Expand Down