Skip to content

fix(error-reporting): Silence ValidationError as user input error (CLI-1FN) - #1361

Open
sentry[bot] wants to merge 3 commits into
mainfrom
seer/fix/cli-1fn-silence-validation-error
Open

fix(error-reporting): Silence ValidationError as user input error (CLI-1FN)#1361
sentry[bot] wants to merge 3 commits into
mainfrom
seer/fix/cli-1fn-silence-validation-error

Conversation

@sentry

@sentry sentry Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Previously, ValidationError instances were not explicitly handled by the classifySilenced function in packages/cli/src/lib/error-reporting.ts. This meant that user input errors, such as providing a non-existent directory to a sourcemap command, were being reported to Sentry as crashes rather than being silenced as expected user-facing errors.

This change addresses the issue by:

  1. Adding 'user_input_error' to the SilenceReason type.
  2. Introducing a new branch in classifySilenced to return 'user_input_error' when the error is an instance of ValidationError.

This ensures that ValidationErrors are now correctly silenced, preventing them from polluting Sentry crash reports while still allowing their volume to be tracked via the cli.error.silenced metric.

Related unit tests in test/lib/error-reporting.test.ts have been updated to reflect this new behavior, asserting that ValidationErrors are now silenced rather than captured.

Fixes CLI-1FN

@sentry sentry Bot changed the title fix(error-reporting): Silence ValidationError as user input error fix(error-reporting): Classify ValidationError as user_input_error Aug 4, 2026
@sentry sentry Bot changed the title fix(error-reporting): Classify ValidationError as user_input_error fix(error-reporting): Silence ValidationError as user input error (CLI-1FN) Aug 4, 2026
@sentry
sentry Bot marked this pull request as ready for review August 4, 2026 22:59
@github-actions github-actions Bot added the risk: low PR risk score: low label Aug 4, 2026
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