Repository navigation
fix(errors): Log 403s as warnings instead of reporting them to Sentry - #173
Merged
Merged
Conversation
Co-Authored-By: Armen Zambrano Gasparnian <44410+armenzg@users.noreply.github.com>
armenzg
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A 403 from GitHub or from an org's Sentry ingest endpoint means the other side refused us. Some causes: a suspended installation, a DSN whose project was disabled, a rate limit, or an org that never gave the app access to its
.sentryrepo. None of them is a bug in the app, but each one became a Sentry error. Four issues account for about 700k events:.sentry/sentry_config.ini(~23k)WebAppHandler._sendnow handles a 403 the way it already handlesBadDsn. It logs a warning, which the logging integration keeps as a breadcrumb rather than an event, counts aforbiddenmetric tagged withownerandhost, and returns 200 with a reason. Any other HTTP error still propagates and gets reported.It returns 200 on purpose: the app handled the webhook, and the 403 is up to the org or the remote end to fix, so the delivery shouldn't show as failed in GitHub. The
forbiddenmetric and the warning log are where to look for these._fetch_configused to calllogger.exceptionbefore re-raising, so a 403 on the config fetch would still have reached Sentry from there. That call only duplicated the top-level handler, which reports every exception that propagates (the SDK dedupes the second capture), so I removed it.via @armenzg.
--
View Session [Sentry]