mirror of
https://github.com/apache/superset.git
synced 2026-07-27 00:52:33 +00:00
MCP client disconnects mid-request (a cancelled or timed-out tool call — normal client behavior, not a Superset bug) are logged at ERROR by the mcp SDK's own transport code, producing two separate Sentry issues from a single incident: mcp.server.streamable_http._handle_post_request logs starlette's ClientDisconnect via logger.exception(), and re-raises it into the session's read stream, where mcp.server.lowlevel.server logs it a second time via a fixed "Received exception from stream: " message (ClientDisconnect always renders as an empty string). Add MCPTransportDisconnectFilter, matching the existing pattern used for FastMCPValidationFilter, to downgrade only these two exact log patterns to WARNING so they stay visible in log aggregation without paging on Sentry. Genuine ERRORs on these loggers are untouched. Fixes SUPERSET-PYTHON-XVB Fixes SUPERSET-PYTHON-YYS Co-Authored-By: Claude <noreply@anthropic.com>