Skip to content

fix(dsn): suppress codeless 'Unknown system error' from fs scans - #1599

Closed
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/dsn-unknown-system-error
Closed

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/dsn-unknown-system-error

Conversation

@sentry

@sentry sentry Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

This PR addresses an issue where the Sentry CLI was reporting benign filesystem errors to Sentry, specifically "Error: Unknown system error -11: Unknown system error -11, scandir '/Users/austin/Documents/app-audit.trace'".

This error occurs when the CLI's DSN scanner encounters special macOS directories, such as .trace bundles (e.g., from Xcode Instruments). Node.js surfaces these platform-specific errno values (like -11) as a generic "Unknown system error" message, crucially without a standard named POSIX code property.

The isIgnorableFileError function in packages/cli/src/lib/dsn/fs-utils.ts was previously designed to only suppress errors based on a hardcoded allowlist of named POSIX error codes (e.g., ENOENT, EACCES, EINVAL). Because the "Unknown system error -11" lacks such a named code, isIgnorableFileError failed to recognize it as ignorable, leading handleFileError to incorrectly capture it to Sentry.

This fix extends isIgnorableFileError to also check if an error's message starts with "Unknown system error". This allows the CLI to correctly identify and silently ignore these benign, platform-specific filesystem events, preventing unnecessary noise in Sentry.

A new test case has been added to fs-utils.test.ts to cover this specific scenario.

Fixes CLI-2AW

@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 temporarily deployed to Preview – sentry-local September 20, 2026 10:44 Inactive
@vercel

vercel Bot commented Sep 20, 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 Sep 20, 2026 10:44am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Sep 20, 2026 10:44am UTC

Request Review

@github-actions github-actions Bot added risk: medium PR risk score: medium risk: low PR risk score: low and removed risk: medium PR risk score: medium labels Sep 21, 2026
@BYK BYK added the jared Trigger the Jared agent to work on stuff label Sep 21, 2026
@BYK

BYK commented Sep 21, 2026

Copy link
Copy Markdown
Member

Jared, take over the patch, resolve merge conflicts and then get it merged

@jared-outpost

jared-outpost Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

took this over. after rebasing onto main the conflict resolves to nothing — this exact fix already landed via #1601, which is a functional superset. #1601 suppresses the codeless Unknown system error scandir noise the same way (error.message.startsWith("Unknown system error")) and also handles the code === "UNKNOWN" variant, with tests covering both the codeless and UNKNOWN-code cases.

so there's no diff left to merge here — rebasing #1599 onto main produces an empty commit. rather than force an empty merge, closing this as superseded by #1601. the CLI-2AW behavior is already fixed on main.

@jared-outpost

jared-outpost Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

closing as superseded by #1601 (already merged to main).

@jared-outpost jared-outpost Bot closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jared Trigger the Jared agent to work on stuff risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant