Files
superset2/tests
Elizabeth Thompson bae6450998 fix(mcp_service): downgrade client-disconnect transport noise to WARNING (SC-115264)
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>
2026-07-26 15:40:28 +00:00
..