Skip to content

Sourcemaps upload fail with 502 using chunked transfers #1425

Open
@ci

Description

@ci

What are the steps to reproduce this issue?

Use the example curl from https://docs.honeybadger.io/api/reporting-source-maps/#overview with the added -H "Transfer-Encoding: chunked" to force the chunked request:

curl -i https://api.honeybadger.io/v1/source_maps \
  -H "Transfer-Encoding: chunked" \
  -F api_key=hbp_example \
  -F revision=123abcd \
  -F minified_url=https://example.com/assets/application.min.js \
  -F source_map=@path/to/application.js.map \
  -F minified_file=@path/to/application.min.js

What happens?

502 error from the AWS ELB:

HTTP/2 502
server: awselb/2.0
date: Wed, 08 Jan 2025 17:26:55 GMT
content-type: text/html
content-length: 122

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>

What were you expecting to happen?

Sourcemap to upload successfully.

Any other comments?

This might not be specific to honeybadger-js but maybe an AWS ELB config? I noticed this while (accidentally) upgrading the bun version I was using which introduced support for chunked transfers with https://bun.sh/blog/bun-v1.1.39#fetch-request-body-streams

What versions are you using?

Package Name: @honeybadger-io/rollup-plugin
Package Version: ^5.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions