Skip to content

fix(mcp): log client rejections at info, not as Sentry errors - #1391

Open
askov wants to merge 1 commit into
solana-foundation:masterfrom
hoodieshq:fix/mcp-client-rejections
Open

askov wants to merge 1 commit into
solana-foundation:masterfrom
hoodieshq:fix/mcp-client-rejections

Conversation

@askov

@askov askov commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Logs two /mcp client rejections at info, and keeps them out of Sentry. wrapMcpServerWithSentry reports both as unhandled errors, although /mcp returns the correct 406 and 400.

Changes

  • Sets the transport onerror in createMcpRequestHandler after connect, so it runs before the Sentry handler.
  • Logs the two client rejections at info, and passes every other transport error on to the Sentry handler.
  • Adds @sentry/core to the entity-inspector dev dependencies, so the specs run the real wrapMcpServerWithSentry.

Behavior Changes

  • A GET to /mcp without text/event-stream in Accept writes an info log instead of a Sentry event, and still returns 406.
  • A POST to /mcp with MCP-Protocol-Version: 2026-07-28 writes an info log instead of a Sentry event, and still returns 400.

Sentry config

An ignoreErrors entry in createSentryConfig also drops both events. It needs a second copy of the message list, and it matches a substring in every server event.

Type of change

  • Bug fix

Related Issues

Closes HOO-1865

Checklist

  • My code follows the project's style guidelines
  • I have added tests that prove my fix/feature works
  • I have run build:info script to update build information

Additional Notes

app/tx/[signature]/__tests__/page.spec.ts fails two cases on upstream/master and on this branch.

wrapMcpServerWithSentry reports two correct 4xx rejections as unhandled
errors. They are 9,460 of the 9,627 events in one Sentry issue over 30 days.
The handler sets transport.onerror after connect, logs both rejections at
info, and passes other errors to Sentry.
@vercel

vercel Bot commented Oct 12, 2026

Copy link
Copy Markdown

@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer Ready Ready Preview Oct 12, 2026 1:02pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR logs two known /mcp client rejections at info instead of sending them to Sentry.

  • Two /mcp client rejections now go to info logs, not Sentry.

Reviews (1) · Last reviewed commit: "fix(mcp): log client rejections at info,..." · Reviewed by Greptile

This branch was successfully deployed

1 active deployment
Preview — 61cf4e20 Deployed Oct 12, 2026 by vercel[bot]
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.

1 participant