Skip to content

fix(github-integration): Distinguish 410 for deleted issues from disabled issues#116142

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/github-410-deleted-issue
Draft

fix(github-integration): Distinguish 410 for deleted issues from disabled issues#116142
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/github-410-deleted-issue

Conversation

@sentry
Copy link
Copy Markdown
Contributor

@sentry sentry Bot commented May 25, 2026

Previously, Sentry would incorrectly report `IntegrationConfigurationError: Issues are disabled for this repository` when a linked GitHub issue was deleted. This was due to the `raise_error` method in `sentry/integrations/github/issues.py` treating all HTTP 410 "Gone" responses from GitHub as a repository configuration error.

GitHub uses the 410 status code for two distinct scenarios: when the issues feature is disabled for a repository, and when a specific issue has been deleted. The previous implementation did not differentiate between these, leading to misleading error messages and unnecessary noise in Sentry.

This fix modifies the raise_error method to inspect the JSON error message returned by GitHub for 410 responses. If the message indicates that the specific issue was "deleted", it now raises an IntegrationResourceNotFoundError. For all other 410 responses, the original IntegrationConfigurationError is raised, correctly indicating when the issues feature is truly disabled.

This change provides more accurate error reporting, helping users and Sentry maintainers to better understand the root cause of integration failures.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes SENTRY-5P3Z

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants