You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaredTrigger the Jared agent to work on stuffrisk: lowPR risk score: low
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.tracebundles (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 POSIXcodeproperty.The
isIgnorableFileErrorfunction inpackages/cli/src/lib/dsn/fs-utils.tswas 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,isIgnorableFileErrorfailed to recognize it as ignorable, leadinghandleFileErrorto incorrectly capture it to Sentry.This fix extends
isIgnorableFileErrorto 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.tsto cover this specific scenario.Fixes CLI-2AW
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.