Skip to content

fix(error-reporting): silence undici TypeError: terminated network errors (CLI-2AD) - #1653

Open
sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/cli-2ad-silence-terminated
Open

sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/cli-2ad-silence-terminated

Conversation

@sentry

@sentry sentry Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Previously, when a network connection dropped after response headers but before the full body was received, Node.js's fetch (undici) would throw a TypeError: terminated. These errors were not being silenced by the CLI's error reporting mechanism because isNetworkError() only checked for TypeError: "fetch failed".

This meant that environmental network issues were being reported to Sentry as if they were CLI bugs.

This change extends isNetworkError() to also recognize TypeError: "terminated" as a network error. This ensures that such errors are correctly classified as network_error and silenced, consistent with the intent to not report user-environment-related network failures. JSDoc comments have been updated to reflect this behavior, and new tests have been added to cover the terminated error type.

Fixes CLI-2AD

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Oct 1, 2026 11:24pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 1, 2026 11:24pm UTC

Request Review

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 8f7e30f6 Deployed Oct 1, 2026 by vercel[bot]
Preview – sentry-local — 8f7e30f6 Deployed Oct 1, 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.

0 participants