-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(sentry apps): Use new error design for sentry app errors #83355
Conversation
|
||
# Represents a user/client error that occured during a Sentry App process | ||
class SentryAppError(SentryAppBaseError): | ||
error_type = SentryAppErrorType.CLIENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you using error_type
anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need error_type in the future for Alert Rule Action UI process/ creation because it's an RPC method and we need to send error context in the RPC response.
@@ -131,7 +128,13 @@ def handle_exception_with_details(self, request, exc, handler_context=None, scop | |||
|
|||
def _handle_sentry_app_exception(self, exception: Exception): | |||
if isinstance(exception, SentryAppIntegratorError) or isinstance(exception, SentryAppError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you planning on sending public context and webhook context separately in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the idea is to make some send_webhook_context_to_integrators(exception)
and call that here. webhook_context
& public_context
will both go to integrators via that send function.
public_context = exception.public_context | ||
if public_context: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use the walrus operator
public_context = exception.public_context | |
if public_context: | |
if public_context := exception.public_context: |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
See this notion doc for the design changes
tl:dr No wrapping errors, sentry app errors take in extras dictionary for additional context
Also a callout: If possible please give feedback if any data is sensitive and shouldn't be sent to one party or the other