Skip to content

fix(sentry): Filter UserInputError from Sentry - #1216

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sentry-filter-userinputerror
Open

fix(sentry): Filter UserInputError from Sentry#1216
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sentry-filter-userinputerror

Conversation

@sentry

@sentry sentry Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This PR addresses an issue where expected UserInputError and ConfigurationError exceptions, particularly those originating from parseIssueId due to invalid input, were being captured and sent to Sentry as issues.

These errors represent user-facing validation failures rather than actual bugs in the application, leading to noise in Sentry.

The fix modifies the sentryBeforeSend function in packages/mcp-core/src/telem/sentry.ts to check for UserInputError and ConfigurationError types. If an event's primary exception is one of these types, sentryBeforeSend now returns null, preventing the event from being sent to Sentry.

Fixes MCP-SERVER-G40

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@sentry
sentry Bot marked this pull request as ready for review July 30, 2026 10:48

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b1138dc. Configure here.

firstException?.type === "ConfigurationError"
) {
return null;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config errors silently dropped from Sentry

High Severity

Filtering all ConfigurationError events in sentryBeforeSend also drops the intentional logIssue calls from formatServerConfigError on HTTP transport. Those alerts notify operators about server-side config failures, and the generic user message claims the operator was notified.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b1138dc. Configure here.

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