chore(transport): Handle HTTP 413 response for oversized envelopes#2885
Merged
sl0thentr0py merged 1 commit intomasterfrom Mar 5, 2026
Merged
chore(transport): Handle HTTP 413 response for oversized envelopes#2885sl0thentr0py merged 1 commit intomasterfrom
sl0thentr0py merged 1 commit intomasterfrom
Conversation
When Relay returns HTTP 413 (Content Too Large), the SDK now logs a specific warning message and records client reports with reason "send_error" for the dropped items. The 413 is not retried since the data is definitively too large. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6826049 to
918a829
Compare
Member
Author
|
reviewed and approved from me since this is a claude PR |
dingsdax
approved these changes
Mar 5, 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.
Description
Handle HTTP 413 (Content Too Large) responses from Relay. Previously, oversized envelopes returned HTTP 400 from Relay. Now that Relay returns 413, the SDK can distinguish size-related rejections from other errors.
Changes:
send_errorfor each dropped item (so Sentry can track data loss)SizeExceededErrorexception class (subclass ofExternalError) for internal flow control:send_errorto theCLIENT_REPORT_REASONSlistCloses #2844
References
Test plan
send_errorreasonsend_envelopedoes not re-raise the error🤖 Generated with Claude Code