From b1138dce82485b6b9dd9b035a18d50b5f3ad021e Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:40:16 +0000 Subject: [PATCH] fix(sentry): Filter UserInputError from Sentry --- packages/mcp-core/src/telem/sentry.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/mcp-core/src/telem/sentry.ts b/packages/mcp-core/src/telem/sentry.ts index c55271da1..158ac740c 100644 --- a/packages/mcp-core/src/telem/sentry.ts +++ b/packages/mcp-core/src/telem/sentry.ts @@ -98,6 +98,15 @@ export function sentryBeforeSend(event: any, hint: any): any { // (e.g., "Country, region, or territory not supported", temperature issues). // Without custom fingerprinting, they all get grouped into a single issue. const firstException = event?.exception?.values?.[0]; + + // Drop expected user-input and configuration errors — these are not bugs. + if ( + firstException?.type === "UserInputError" || + firstException?.type === "ConfigurationError" + ) { + return null; + } + if (firstException?.type === "AI_APICallError" && firstException.value) { event.fingerprint = ["AI_APICallError", firstException.value]; }