Fix a few errors reported on sentry#6228
Open
padenot wants to merge 8 commits into
Open
Conversation
Collaborator
|
What about keeping transient errors in Sentry, but ignoring them there? So if we see a huge uptick we could investigate |
Collaborator
Author
|
Update w/ the 50 -> 100 turn change dropped, and marco's comment addressed |
marco-c
previously approved these changes
Jun 24, 2026
marco-c
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, but there's still a linting error
…_points() search() was removed in qdrant-client 1.16.0. The dev deployment was built from a standalone branch that pinned bugbug at git rev f8b31eb, which had a loose qdrant-client>=1.15.1,<1.19.0 constraint. That let the image resolve to 1.16+, causing REVIEWHELPER-API-25. Fixes REVIEWHELPER-API-25
4xx responses from Searchfox (file not found, bad request) are handled gracefully and returned as tool errors; they don't warrant Sentry events. Unexpected exceptions (network failures, etc.) remain at error level. Fixes REVIEWHELPER-API-21
Introduce BugNotFoundError and RevisionNotFoundError as distinct types and add them to sentry_sdk ignore_errors. Requests for private security bugs or restricted Phabricator revisions are expected operational behaviour, not errors worth alerting on. Improve the error message for bug lookups to mention the confidential security bug case. Fixes BUGBUG-MCP-2M Fixes BUGBUG-MCP-2K Fixes BUGBUG-MCP-2Q Fixes BUGBUG-MCP-2P
Catch requests.HTTPError from the Bugzilla API in SanitizedBug.get() and raise BugzillaAPIError instead. Add it to ignore_errors so transient Bugzilla outages (502 Bad Gateway etc.) don't generate Sentry alerts. Don't log Bugzilla 5xx errors to Sentry Split BugzillaAPIError into BugzillaAPIError (4xx, remains visible) and BugzillaTransientError (5xx, suppressed). 502/503 Bugzilla outages are expected and don't need Sentry alerts; 4xx errors may indicate bugs in our code and should stay visible.
A BMO outage can return a 200 with a non-standard body that lacks the expected 'bugs' key, causing a KeyError in libmozdata's callback. Catch it and raise BugzillaTransientError so it is suppressed in Sentry. Fixes BUGBUG-MCP-2S Fixes BUGBUG-MCP-2T
Two concurrent requests for the same (revision_id, diff_id) could both pass the SELECT check and both attempt INSERT, hitting the unique constraint. Catch IntegrityError, rollback, and re-fetch the row inserted by the winning request. Fixes REVIEWHELPER-API-J
Introduce InvalidDocPathError as a ToolError subclass for the read_fx_doc_section tool and add it to ignore_errors. Models frequently pass .html paths or non-existent paths; these are expected and don't need Sentry alerts. Fixes BUGBUG-MCP-2Y Fixes BUGBUG-MCP-8
marco-c
approved these changes
Jun 24, 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.
This patch series is composed of independent commits, only related by the fact that each of those fixes one or more issues surfaced by sentry. They should be reviewed independently.
The goal is to fix some sentry errors, and prequalify some of them (usually not actionable, e.g. a transient failure of another service) to something that doesn't create a sentry entry.