Repository navigation
Conversation
…rror Once a relayed response had started, a provider failure reached the caller as the raw urllib3 exception chained to http.client's, so Sentry grouped it as an unrelated issue without the request's tags. The same failure before the response is a coded error that GitServer reports through emit_error. The relay now raises the same coded errors while it reads the body as it does for the request, without the library exceptions chained: a read timeout is a ResourceGatewayTimeout, a broken connection or a body cut off early a ResourceServiceUnavailable, anything else from urllib3 a ResourceBadGateway. GitServer passes the error to emit_error with the request's tags, then still raises it, so the WSGI server drops the connection rather than ending the response as if it were whole. It is still counted as stream_interrupted, so existing counts keep their meaning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
giovanni-guidini
approved these changes
Nov 3, 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.
Before a relayed response starts, relay failures become coded errors that
GitServerreports throughemit_error. Once the body was streaming, they reached the caller as raw urllib3 exceptions instead, without thescm-gitfingerprint or the request's tags.from None:ResourceGatewayTimeout;ResourceServiceUnavailable;ResourceBadGateway.emit_errorwith the request's tags, still counts it asstream_interrupted, then raises it again. The status line is already sent, so raising is what makes the WSGI server drop the connection instead of ending the response as if it were complete.Sentry's endpoint needs no change. Its SDK will also capture the raised error, and a
before_sendrule can drop that duplicate if it's noisy.Tested end to end against the fake upstream (a chunk cut off mid-body, and a read timeout), plus unit tests for each mapping. Each test checks that the body bytes appear nowhere in the reported exception chain.
🤖 Generated with Claude Code