Skip to content

fix(error-reporting): Silence expected ResolutionError for user input - #1362

Draft
sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/silence-resolution-error-hTrjum
Draft

fix(error-reporting): Silence expected ResolutionError for user input#1362
sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/silence-resolution-error-hTrjum

Conversation

@sentry

@sentry sentry Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This PR addresses issue CLI-RP by silencing ResolutionErrors that are a result of expected user input failures, rather than actual CLI bugs.

Problem:
When users provide short or non-existent event IDs (e.g., sentry event view <org>/<project>/ca0f261fb715), the CLI's hex-ID recovery mechanism correctly identifies that the event cannot be found and throws a ResolutionError. However, these errors were being reported to Sentry as issues (over 7,500 occurrences), creating noise, because the error reporting system (classifySilenced) had no way to distinguish these expected user-input errors from genuine CLI defects.

Solution:
This fix implements the approach outlined in PR #1115:

  1. packages/cli/src/lib/errors.ts: Added a readonly expected: boolean property to the ResolutionError class, initialized to false by default. To adhere to the useMaxParams lint rule, an asExpected() fluent method was introduced to mark an error instance as expected post-construction.
  2. packages/cli/src/lib/hex-id-recovery.ts: Modified buildRecoveryError to call .asExpected() on ResolutionError instances generated for no-matches, past-retention, and looks-like-slug reasons. These are now explicitly marked as expected user-input failures.
  3. packages/cli/src/lib/error-reporting.ts: Updated classifySilenced to check if an error is an instance of ResolutionError and its expected property is true. If so, it now returns a new user_input_error silence reason, preventing these events from being captured as Sentry issues.

Fixes CLI-RP

@sentry sentry Bot changed the title fix(error-reporting): Silence ResolutionError for user input errors fix(error-reporting): Silence expected ResolutionError for user input Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants