Skip to content

fix(cli): Explain server-side chunk upload failures - #2214

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/cli-chunk-upload-error-messages
Open

sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/cli-chunk-upload-error-messages

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

sourcemap upload failures on 0.49.0 come from the server, not the CLI. There were 15 artifact bundle assembly errors (9 Not all chunks available for assembling, 6 internal server error), all on self-hosted instances. Another 12 are 5xx responses from the chunk-upload options GET, and those currently group under "Chunk upload failed". In both cases the CLI can't recover by retrying: Sentry caches the assemble result per bundle checksum for 10 minutes (set_assemble_status, ex=600), and the options GET already retries 5xx twice.

This PR makes the errors say what happened:

  • Assembly errors become AssemblyError. The message says the server failed to assemble the bundle, keeps the server's detail, and mentions the 10-minute cache.
  • 5xx from the options GET becomes ChunkUploadOptionsError. The message points at the server or proxy instead of printing its HTML error page.

Both are ApiError subclasses with their own name, the same pattern as RateLimitError. The project's fingerprint rule groups ApiError by status and command, so the separate class name is what pulls them out of the 500 and 502 groups.

Reporting rule: an AssemblyError on self-hosted (!isSaaS()) is silenced as assembly_failed_self_hosted, so it still counts on cli.error.silenced. On SaaS it is still captured, now under its own group. The options-GET error is still captured everywhere.

Before

Error: Artifact bundle assembly failed
  Endpoint: organizations/my-org/artifactbundle/assemble/
  Not all chunks available for assembling
Error: Failed to get chunk upload options: 502 Bad Gateway
  <!DOCTYPE html>
<html><head><title>sentry.example.com | 502: Bad gateway</title></head><body>Bad gateway</body></html>

After

Error: Artifact bundle assembly failed on the Sentry server
  Endpoint: organizations/my-org/artifactbundle/assemble/
  Not all chunks available for assembling
  Sentry keeps this result for about 10 minutes. Retry after that, or upload a changed bundle.
Error: Failed to get chunk upload options: 502 Bad Gateway
  Endpoint: organizations/my-org/chunk-upload/
  The Sentry server, or a proxy in front of it, returned a server error. Check that Sentry is up and reachable, then retry.

via @betegon.

--

View Session [Sentry]

Artifact bundle assembly errors now say the Sentry server failed to
assemble the bundle, keep the server's detail, and note that Sentry
caches the result for about 10 minutes (assemble status TTL), so a
retry needs to wait or upload a changed bundle.

A 5xx from the chunk-upload options request now names the server or
proxy instead of printing its HTML error page. Its own error class
keeps it from grouping with failed chunk POSTs, which share the
ApiError status + command fingerprint rule.

Assembly errors on self-hosted are silenced as
`assembly_failed_self_hosted` and stay counted on `cli.error.silenced`.
SaaS assembly errors are still captured.

Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 12, 2026 10:16pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 12, 2026
…error-messages

# Conflicts:
#	packages/cli/src/lib/api/chunk-upload.ts

This branch was successfully deployed

1 active deployment
Preview — bd7da90d Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant