From f48ea79390c2ae8144fdfce12053b086f418e40a Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:40:27 +0000 Subject: [PATCH] fix(error-reporting): silence ValidationError from user input --- src/lib/error-reporting.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/error-reporting.ts b/src/lib/error-reporting.ts index ac145c6e5..6f996ef7d 100644 --- a/src/lib/error-reporting.ts +++ b/src/lib/error-reporting.ts @@ -52,7 +52,8 @@ type SilenceReason = | "auth_expected" | "api_user_error" | "api_query_error" - | "network_error"; + | "network_error" + | "validation_error"; /** * Classify whether an error should be silenced. @@ -82,6 +83,12 @@ export function classifySilenced(error: unknown): SilenceReason | null { if (error instanceof ContextError) { return "context_missing"; } + // A ValidationError always means the user supplied an invalid argument value + // (e.g. an empty issue identifier). It is never a CLI bug, so silence the + // whole class to avoid noise from AI-agent callers passing bad input. + if (error instanceof ValidationError) { + return "validation_error"; + } // All AuthError reasons are expected auth states the user must act on, not // CLI bugs: `not_authenticated` (no token), `expired` (token aged out), and // `invalid` (a bad/insufficiently-scoped token the user supplied). `invalid`