Skip to content

fix(cli): Silence dropped connections and bad sourcemap directories - #1606

Merged
BYK merged 1 commit into
mainfrom
fix/cli-silence-env-noise
Oct 23, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/cli-silence-env-noise

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Two kinds of user-environment failures still show up in Sentry as CLI issues:

  • TypeError: terminated (CLI-2AD): undici throws this when the connection drops while the response body is streaming. fix(cli): retry interrupted GET responses across commands #1548 already retries finite GET bodies, so one that still gets through is the same offline/proxy noise as fetch failed. isNetworkError() now matches it too.
  • Bad sourcemap directory (CLI-1FN): assertDirectoryReadable throws a ValidationError with field "directory" when the directory doesn't exist, isn't a directory, or can't be read. This is now silenced the same way as the missing --input file case (CLI-1JY).

The original getsentry/cli#1616 silenced every ValidationError and changed paginate() back to fixed page sizes. That conflicts with the targeted silencing policy here and with getsentry/cli#1615, so this port only covers the sourcemap directory case.

Ported from getsentry/cli#1653 and getsentry/cli#1616, which are being closed with the repo archive.

via BYK.

--

View Junior Session in Sentry

Two kinds of user-environment failures still reached Sentry as issues:

- undici aborts a response body with `TypeError: terminated` when the
  connection drops mid-stream (CLI-2AD). GET bodies are already retried,
  so one that still escapes is the same offline/proxy noise as
  `fetch failed` and is now treated as a network error.
- A missing, non-directory, or unreadable sourcemap directory throws a
  ValidationError with field "directory" (CLI-1FN). It is now silenced
  like the missing --input file case. Other ValidationErrors stay
  captured.

Ported from getsentry/cli#1653 and getsentry/cli#1616.

Co-Authored-By: BYK <burak.kaya@sentry.io>
@vercel

vercel Bot commented Oct 22, 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 Oct 22, 2026 6:31pm UTC

Request Review

@BYK
BYK merged commit 5e7b12b into main Oct 23, 2026
26 checks passed
@BYK
BYK deleted the fix/cli-silence-env-noise branch October 23, 2026 11:19

This branch was previously deployed

1 inactive deployment
Preview — 48121594 Deployed Oct 22, 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