Skip to content

fix(cli): Send chunk-upload failures through the shared API error path - #2164

Merged
betegon merged 1 commit into
mainfrom
fix/cli-chunk-upload-api-error
Nov 11, 2026
Merged

betegon merged 1 commit into
mainfrom
fix/cli-chunk-upload-api-error

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Split out of #2160.

sourcemap upload chunk POSTs built their own error from the raw response body. A 401/403 there skipped the guidance every other request gets, and enriched403 stayed false. Over 14 days, sourcemap upload recorded about 78k 401/403 failures on 0.45.0, some of them on chunk POSTs. This PR sends those failures through the same path as every other request.

Before

Error: Chunk upload failed: 403 Forbidden
  Endpoint: <region-url>/api/0/organizations/my-org/chunk-upload/
  {"detail":"You do not have permission to perform this action."}

After

Error: Chunk upload failed: 403 Forbidden
  Endpoint: <region-url>/api/0/organizations/my-org/chunk-upload/
  You do not have permission to perform this action.

  Your SENTRY_AUTH_TOKEN token may lack the required scope for this operation.
  Check token scopes at: <sentry-url>/settings/account/api/auth-tokens/

Stands alone on main.

via @betegon.

--

View Session in Sentry

Chunk-upload POSTs built their own ApiError from the raw body, so their
401/403s skipped the guidance every other request gets. Export
`throwRawApiError` with a message prefix and use it for both chunk
upload paths.

Co-Authored-By: bete <[email protected]>
@vercel

vercel Bot commented Nov 11, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 11, 2026 8:40am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 11, 2026
@github-actions github-actions Bot added risk: low PR risk score: low and removed risk: medium PR risk score: medium labels Nov 11, 2026
@betegon
betegon merged commit e3da623 into main Nov 11, 2026
27 checks passed
@betegon
betegon deleted the fix/cli-chunk-upload-api-error branch November 11, 2026 09:08

This branch was previously deployed

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

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant