Skip to content

minidump endpoint does not respond 413 for too large content #5838

Description

@jpnurmi

While changing the Native SDK to handle HTTP 413 Content Too Large (NATIVE-160), we found out that unlike /envelope/, the /minidump/ endpoint doesn't respond with 413 but with 400 + reason in the body:

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

Is it possible to make the minidump endpoint respond 413? Not sure if this is intentional or a miss, but I thought I'd open a ticket and see where it takes us. :)

_Originally posted by @jpnurmi in getsentry/sentry-native#1647 (comment)

Activity

  1. linear-code commented on Apr 15, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 15, 2026
  3. jjbayer commented on Apr 15, 2026

    @jjbayer
    Member

    Thanks for reporting this, will be fixed.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 15, 2026
  5. jjbayer commented on Apr 21, 2026

    @jjbayer
    Member

    @jpnurmi can you please verify if this still happens? Looks like it has already been fixed: #5838

  6. jpnurmi commented on Apr 21, 2026

    @jpnurmi
    CollaboratorAuthor

    Hmm, I'm still getting 400 with an inflated (truncate(file, 200*1024*1024)) 200mb minidump.

    Request:

    [57807:69420525:20260421,150402.512262:ERROR http_transport_mac.mm:259] POST https://oXXXX.ingest.us.sentry.io:443/api/XXXX/minidump/?sentry_client=sentry.native/0.13.7&sentry_key=REDACTED&guid=REDACTED size=(null) headers={
        "Content-Encoding" = gzip;
        "Content-Type" = "multipart/form-data; boundary=---MultipartBoundary-yboSng2w1oTRw8wHVp7JHACrT5qxk3SW---";
        "User-Agent" = "Crashpad/0.8.0 CFNetwork/3860.400.51 Darwin/25.3.0 (arm64)";
    }
    

    Response:

    [57807:69420525:20260421,150402.512563:ERROR http_transport_mac.mm:265] status=400 size=142 headers={
        "Access-Control-Allow-Origin" = "*";
        "Alt-Svc" = "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000";
        "Content-Encoding" = br;
        "Content-Type" = "application/json";
        Date = "Tue, 21 Apr 2026 13:04:02 GMT";
        Server = nginx;
        "Strict-Transport-Security" = "max-age=31536000; includeSubDomains; preload";
        "Transfer-Encoding" = Identity;
        Vary = "origin, access-control-request-method, access-control-request-headers,accept-encoding";
        Via = "1.1 google";
        "access-control-expose-headers" = "x-sentry-error,x-sentry-rate-limits,retry-after";
        "cross-origin-resource-policy" = "cross-origin";
    } body="{"detail":"invalid multipart data","causes":["failed to read stream","failed to read stream","length limit exceeded","length limit exceeded"]}"
    
  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 21, 2026
  8. jjbayer commented on Apr 22, 2026

    @jjbayer
    Member

    I will add some more tests to see if we have more gaps.

  9. self-assigned this
    on Apr 22, 2026
  10. jpnurmi commented on Apr 22, 2026

    @jpnurmi
    CollaboratorAuthor

    Could the problem be related to how Crashpad streams the multipart body? Parts are concatenated and compressed on the fly, so the final size isn't known when the request is sent => no Content-Length is set.

  11. jjbayer commented on Apr 22, 2026

    @jjbayer
    Member

    @jpnurmi good catch, got a repro test now: #5880
    I will work on a fix tomorrow.

  12. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions