Repository navigation
fix(mcp): keep caller errors out of Sentry and tag what remains - #516
Merged
Merged
Conversation
Every tool failure that was not a track_container rejection reached Sentry, so an invalid key, a 404 and an SDK input check each raised an exception event. They all carried one fixed message and stack, so Sentry also merged unrelated failures (MCP-SERVER-F held both ValidationError and NotFoundError). A tool failure now stays out of Sentry when the caller can fix it: a ContainerCheckDigitError, TrackContainerError or ToolInputError from any tool, or a Terminal49 answer of 400, 403, 404, 409, 410 or 422. A 401 counts only for a credential the caller supplied (api_key, agent). The gateway resolves user credentials and configures the shared token itself, so a 401 for those is a gateway/API disagreement and is still reported. The client response and the mcp.tool.error log line are unchanged. Reported failures keep the fixed message and now carry error.class, upstream.status_code, mcp.tool and mcp.credential_type tags, with a fingerprint of class and status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8cPhjxmTweWGCzzfxM9ys
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Shadow risk calibration
Calibration result: agreement. Shadow risk never blocks or enables merge. Keep it in observation mode until roughly 50 pull requests have human-reviewed labels, then calibrate before considering any policy use. |
dodeja
marked this pull request as ready for review
November 15, 2026 22:48
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp-serversent every failed tool call to Sentry under one generic message, so unrelated errors merged into a few large issues.Caller errors are no longer reported:
ToolInputError,ContainerCheckDigitErrorandTrackContainerError;api_key,agent).These cover MCP-SERVER-F. MCP-SERVER-M and J were already fixed by fix(mcp): keep tracking validation out of exception reporting #457 and have had no events since.
Still reported:
user,shared_token);Reports now carry tags
error.class,upstream.status_code,mcp.toolandmcp.credential_type, plus a fingerprint built from class and status. The message stays generic, so no upstream text or tokens are sent. Responses to clients are unchanged.Open bug (not fixed here): MCP-SERVER-G
The API rejects tokens that the gateway resolves for a WorkOS user, about every 30 to 90 minutes.
search_containerfails with a 401, and thenwhoamifails with a 401 too. The gateway forwards the token correctly (auth_source: workos_mcp,credential_type: user), so the cause is between/v2/connected-clients/resolveand the V2 authenticator in tnt-api. Next step: checkapi_auth.rejectionin the API logs around 2026-11-15 03:55 UTC.Testing
vp run checkpasses,vp run --filter @terminal49/mcp testpasses (998 tests), andnpm run agent-verifypasses.Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.