Skip to content

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

Merged
jpnurmi merged 2 commits into
masterfrom
jpnurmi/feat/http-413
Apr 15, 2026
Merged

feat(transport): add error log for oversized envelopes (HTTP 413)#1647
jpnurmi merged 2 commits into
masterfrom
jpnurmi/feat/http-413

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

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

github-actions Bot commented Apr 14, 2026

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

Generated by 🚫 dangerJS against 881ea19

@JoshuaMoelans JoshuaMoelans left a comment

Copy link
Copy Markdown
Member

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

jpnurmi commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator Author

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

jpnurmi commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator Author

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?

@JoshuaMoelans

Copy link
Copy Markdown
Member

@jpnurmi ah that makes sense; I only looked into the Crashpad side of things before, not the actual endpoint responses. We can skip for now!

@jpnurmi jpnurmi marked this pull request as ready for review April 15, 2026 07:42
@jpnurmi

jpnurmi commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

Not sure if it's intentional or a miss, but I can open a relay ticket and we'll see 👍

@jpnurmi jpnurmi merged commit 7bf4d2c into master Apr 15, 2026
61 checks passed
@jpnurmi jpnurmi deleted the jpnurmi/feat/http-413 branch April 15, 2026 08:08
BernhardMarconato pushed a commit to elgatosf/sentry-native that referenced this pull request Apr 21, 2026
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