You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 263382d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): Record why Sentry refused a request on 401/403 errors (#2163)
Split out of #2160.
401/403s from the CI commands (`release *`, `sourcemap upload`) are
silenced as user errors, and the detail on their spans is mostly
scrubbed to `[Filtered]`, so we can't tell them apart. Over 14 days that
was about 217k failures from about 1.5k orgs. This PR records a fixed
reason category for each one. The CLI's own output doesn't change.
### Before
```
# cli.command span
api_error.status: 401
api_error.message: Failed to create release: 401 Unauthorized
api_error.detail: [Filtered]
# cli.error.silenced metric
error_class: ApiError reason: api_user_error api_status: 401
# cli.api_error_silenced log
status: 401 endpoint: … detail: [Filtered]
```
### After
```
# cli.command span
api_error.status: 401
api_error.message: Failed to create release: 401 Unauthorized
api_error.denial_reason: unrecognized
# cli.error.silenced metric
error_class: ApiError reason: api_user_error api_status: 401 api_denial_reason: unrecognized
# cli.api_error_silenced log
status: 401 endpoint: … denial_reason: unrecognized
```
The values are `insufficient_scope`, `access_denied`, `expired`,
`unrecognized`, `member_policy` and `seat_limit`; #2168 adds
`org_mismatch`. On 401/403s, `denial_reason` replaces `detail`. The
values avoid words such as "auth" and "token", because scrubbing turns
values containing them into `[Filtered]`.
<!-- junior-request-attribution:start -->
via @betegon.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A28e783cd48c13b214d69caf6d8977a0c -->
--
[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/agent%3A28e783cd48c13b214d69caf6d8977a0c/?project=4510944073809921)
<!-- junior-session-footer:end -->
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: bete <28983162+betegon@users.noreply.github.com>
0 commit comments