BUG REPORT: HTTP errors are being silently swallowed in the StreamableHTTP client #1010
Copy link
Copy link
Closed
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working on
Description
Initial Checks
- I confirm that I'm using the latest version of MCP Python SDK
- I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
Description
When an MCP server returns HTTP 5xx errors (e.g., when the server is down) after initial connection, these errors are not being propagated to the caller. This makes it impossible for client applications to detect and handle server failures appropriately. More than that, clients which are waiting for response stream, like Strands SDK, are hanging forever since no response is returned
Example Code
Python & MCP Python SDK
Any
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working on
Activity
Kulaxyz commentedon Jun 23, 2025
Prepared a PR that fixes this issue
[-]HTTP errors are being silently swallowed in the StreamableHTTP client[/-][+]BUG REPORT: HTTP errors are being silently swallowed in the StreamableHTTP client[/+]maxisbey commentedon Jan 7, 2026
Related report in #1835 includes a working patch that:
httpx.HTTPStatusErrorin_handle_post_requestJSONRPCErrorresponse with the HTTP error detailsAI Disclaimer