Skip to content

Conversation

cursor[bot]
Copy link
Contributor

@cursor cursor bot commented Oct 7, 2025

Fixes an issue where GitHub IP allowlist errors generated noisy Sentry issues.

Previously, GitHub 403 responses indicating an IP allowlist restriction were treated as generic API failures, leading to unnecessary Sentry issues for what are essentially customer configuration problems.

This PR introduces specific handling for GitHub IP allowlist errors:

  • The GitHub client now detects these specific 403 errors and converts them into IntegrationConfigurationError.
  • The integration proxy endpoint catches IntegrationConfigurationError, returning a clear 403 response to the user and logging the event without creating a Sentry issue.
  • The metrics lifecycle is updated to classify these as "halts" rather than "failures" to prevent automated Sentry issue creation.

This change reduces Sentry noise, provides clearer feedback to users about actionable configuration issues, and improves error classification.

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.


Open in Cursor Open in Web

Co-authored-by: tillman.elser <tillman.elser@sentry.io>
Copy link
Contributor Author

cursor bot commented Oct 7, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cursor cursor bot requested a review from trillville October 7, 2025 20:54
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 7, 2025
Copy link

codecov bot commented Oct 7, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
28705 2 28703 240
View the top 2 failed test(s) by shortest run time
tests.sentry.integrations.github.test_client.GithubProxyClientTest::test_regular_403_error_not_converted
Stack Traces | 2.39s run time
#x1B[1m#x1B[.../integrations/github/test_client.py#x1B[0m:727: in test_regular_403_error_not_converted
    with pytest.raises(ApiError) as exc_info:
#x1B[1m#x1B[31mE   Failed: DID NOT RAISE <class 'sentry.shared_integrations.exceptions.ApiError'>#x1B[0m
tests.sentry.integrations.github.test_client.GithubProxyClientTest::test_ip_allowlist_error_converts_to_configuration_error
Stack Traces | 3.65s run time
#x1B[1m#x1B[.../integrations/github/test_client.py#x1B[0m:705: in test_ip_allowlist_error_converts_to_configuration_error
    with pytest.raises(IntegrationConfigurationError) as exc_info:
#x1B[1m#x1B[31mE   Failed: DID NOT RAISE <class 'sentry.shared_integrations.exceptions.IntegrationConfigurationError'>#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

1 participant