-
-
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
chore(sentryapps): better logging and errors for select requester #79377
Conversation
}, | ||
) | ||
raise |
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.
now that we aren't swallowing this exception, do we gracefully handle it?
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.
Good pt, I just added a distinction to check now, if we get ApiError -> we return a message about validation failure and if the request to the webhook goes wrong we return a somewhat generic message and log the error.
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #79377 +/- ##
===========================================
+ Coverage 57.01% 78.35% +21.33%
===========================================
Files 7114 7125 +11
Lines 314446 315158 +712
Branches 51416 51510 +94
===========================================
+ Hits 179292 246950 +67658
+ Misses 130529 61739 -68790
- Partials 4625 6469 +1844 |
"install_uuid": self.install.uuid, | ||
"project_slug": self.project_slug, | ||
"uri": self.uri, | ||
"url": url, |
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.
isn't uri enough for debugging here? what added value does url have?
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.
the final url would come in handy in checking who we are contacting, and what the final query stirng is (since for this request we tend to have a bunch of query params).
It is somewhat redundant with the uri though, so I'd probably prefer to keep the url to debug with
@@ -241,6 +242,6 @@ def prepare_ui_component( | |||
component=component, install=installation, project_slug=project_slug, values=values | |||
).run() | |||
return component | |||
except APIError: | |||
except (APIError, ValidationError): | |||
# TODO(nisanthan): For now, skip showing the UI Component if the API requests fail |
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.
Lol! This TODO seems very old and important. Basically what to do here is to return the error and surface it to the user. Future PRs though.
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.
Let's merge this :D It would make my life much easier as we have two customers waiting to see why their app is broken.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Ok more like let's differentiate between when we fail due to external requests failing or due to validation errors
Changes: