sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(anomaly detection): Surface errors to the user on API alert create and update

Open mifu67 opened this issue 1 year ago • 1 comments

If an error occurs on serializer.save(), catch the error and surface it to the user instead of giving an InternalError.

Fixes https://getsentry.atlassian.net/browse/ALRT-193

mifu67 avatar Aug 06 '24 21:08 mifu67

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.25%. Comparing base (6b13dc0) to head (8f49167). Report is 106 commits behind head on master.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #75691       +/-   ##
===========================================
+ Coverage   54.58%   78.25%   +23.66%     
===========================================
  Files        5741     6820     +1079     
  Lines      241323   303824    +62501     
  Branches    41349    52256    +10907     
===========================================
+ Hits       131735   237754   +106019     
+ Misses     108114    59684    -48430     
- Partials     1474     6386     +4912     
Files Coverage Δ
src/sentry/incidents/logic.py 91.10% <100.00%> (+69.05%) :arrow_up:
src/sentry/incidents/serializers/alert_rule.py 92.80% <100.00%> (+65.04%) :arrow_up:

... and 2350 files with indirect coverage changes

codecov[bot] avatar Aug 07 '24 19:08 codecov[bot]

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ BadRequest: Invalid request sentry.integrations.slack.tasks.search_channel_... View Issue

Did you find this useful? React with a 👍 or 👎

sentry[bot] avatar Aug 20 '24 06:08 sentry[bot]