Skip to content

fix(catalog): Prevent ApiClientError from being logged as server bug - #1155

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/catalog-api-client-error-logging
Open

fix(catalog): Prevent ApiClientError from being logged as server bug#1155
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/catalog-api-client-error-logging

Conversation

@sentry

@sentry sentry Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The update_project tool in packages/mcp-core/src/tools/catalog/update-project.ts was unconditionally calling logIssue(err) in its catch block. This led to ApiClientError instances (which represent 4xx HTTP responses due to invalid user input, e.g., bad slugs) being reported to Sentry as high-priority server bugs.

This change modifies the catch block to check if the error is an ApiClientError. If it is, the error is re-thrown directly, allowing the MCP framework's existing error handling (which correctly formats ApiClientError as an "Input Error" for the user and does not log it to Sentry) to take over. This prevents expected user input validation errors from cluttering Sentry with false positives.

Fixes MCP-SERVER-G3D

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

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