Skip to content

Conversation

@GabeVillalobos
Copy link
Member

WIP draft refactors to clean up error handling by creating distinct mappings, which include:

  • The exception type to map from
  • The response code to return to the proxy requestor
  • The metrics to log for these classes of failures
  • A log message name for the debug logging when a request fails

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 1, 2025
@codecov
Copy link

codecov bot commented Oct 1, 2025

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
41410 4 41406 250
View the top 3 failed test(s) by shortest run time
tests.sentry.integrations.api.endpoints.test_integration_proxy.InternalIntegrationProxyEndpointTest::test_handles_api_timeout_error
Stack Traces | 1.61s run time
#x1B[1m#x1B[.../api/endpoints/test_integration_proxy.py#x1B[0m:566: in test_handles_api_timeout_error
    assert proxy_response.data is None
#x1B[1m#x1B[31mE   assert {'detail': 'API request timed out'} is None#x1B[0m
#x1B[1m#x1B[31mE    +  where {'detail': 'API request timed out'} = <Response status_code=504, "application/json">.data#x1B[0m
tests.sentry.integrations.api.endpoints.test_integration_proxy.InternalIntegrationProxyEndpointTest::test_handles_api_unauthorized
Stack Traces | 1.71s run time
#x1B[1m#x1B[.../api/endpoints/test_integration_proxy.py#x1B[0m:481: in test_handles_api_unauthorized
    assert proxy_response.data is None
#x1B[1m#x1B[31mE   assert {'detail': 'hah, noooo'} is None#x1B[0m
#x1B[1m#x1B[31mE    +  where {'detail': 'hah, noooo'} = <Response status_code=401, "application/json">.data#x1B[0m
tests.sentry.integrations.api.endpoints.test_integration_proxy.InternalIntegrationProxyEndpointTest::test_handles_identity_not_valid
Stack Traces | 1.82s run time
#x1B[1m#x1B[.../api/endpoints/test_integration_proxy.py#x1B[0m:439: in test_handles_identity_not_valid
    assert proxy_response.data is None
#x1B[1m#x1B[31mE   assert {'detail': ''} is None#x1B[0m
#x1B[1m#x1B[31mE    +  where {'detail': ''} = <Response status_code=401, "application/json">.data#x1B[0m
tests.sentry.integrations.api.endpoints.test_integration_proxy.InternalIntegrationProxyEndpointTest::test_handles_api_host_errors
Stack Traces | 1.85s run time
#x1B[1m#x1B[.../api/endpoints/test_integration_proxy.py#x1B[0m:523: in test_handles_api_host_errors
    assert proxy_response.data is None
#x1B[1m#x1B[31mE   assert {'detail': 'API request failed'} is None#x1B[0m
#x1B[1m#x1B[31mE    +  where {'detail': 'API request failed'} = <Response status_code=503, "application/json">.data#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.

@getsantry
Copy link
Contributor

getsantry bot commented Nov 18, 2025

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Nov 18, 2025
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 Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants