Skip to content

feat(transport): add error log for oversized envelopes (HTTP 413)#1647

Draft
jpnurmi wants to merge 2 commits intomasterfrom
jpnurmi/feat/http-413
Draft

feat(transport): add error log for oversized envelopes (HTTP 413)#1647
jpnurmi wants to merge 2 commits intomasterfrom
jpnurmi/feat/http-413

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented Apr 14, 2026

Per the spec for dealing with network failures, the SDK SHOULD log an error when an envelope is discarded due to a HTTP 413 Content Too Large response so users understand why their data was dropped.

https://develop.sentry.dev/sdk/foundations/transport/offline-caching/#dealing-with-network-failures

A partial solution to #1487, Crashpad needs to be addressed separately.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 881ea19

Copy link
Copy Markdown
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not sure if it fully closes #1487 because of Crashpad not handling 413's yet IIRC.

@jpnurmi
Copy link
Copy Markdown
Collaborator Author

jpnurmi commented Apr 14, 2026

LGTM, not sure if it fully closes #1487 because of Crashpad not handling 413's yet IIRC.

Oops, good catch! I'll take a look.

@jpnurmi jpnurmi marked this pull request as draft April 14, 2026 13:57
@jpnurmi jpnurmi marked this pull request as draft April 14, 2026 13:57
@jpnurmi
Copy link
Copy Markdown
Collaborator Author

jpnurmi commented Apr 14, 2026

Unlike /envelope/, the /minidump/ endpoint doesn't respond with 413:

[47325:52067264:20260414,181631.861230:ERROR http_transport_mac.mm:259] HTTP status 400, response = "{"detail":"invalid multipart data","causes":["stream size exceeded limit: 209715200 bytes"]}"
Analysis

/envelope/ — returns 413 via Axum's body-limit middleware:

/minidump/ — multipart bypasses the body-limit layer and reports oversize as 400:

Status-code mapping — the multer error becomes 400, not 413:

Skip Crashpad for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants