René's URL Explorer Experiment


Title: HTTP transport swallows non-2xx status codes causing client to hang · Issue #2110 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: HTTP transport swallows non-2xx status codes causing client to hang · Issue #2110 · modelcontextprotocol/python-sdk

X Title: HTTP transport swallows non-2xx status codes causing client to hang · Issue #2110 · modelcontextprotocol/python-sdk

Description: Summary When an MCP server returns non-2xx HTTP status codes (401/403/404/5xx), the Streamable HTTP and SSE transports do not reliably propagate the error to the caller. In the Streamable HTTP transport, post_writer catches exceptions an...

Open Graph Description: Summary When an MCP server returns non-2xx HTTP status codes (401/403/404/5xx), the Streamable HTTP and SSE transports do not reliably propagate the error to the caller. In the Streamable HTTP tran...

X Description: Summary When an MCP server returns non-2xx HTTP status codes (401/403/404/5xx), the Streamable HTTP and SSE transports do not reliably propagate the error to the caller. In the Streamable HTTP tran...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/2110

X: @github

direct link

Domain: redirect.github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HTTP transport swallows non-2xx status codes causing client to hang","articleBody":"## Summary\n\nWhen an MCP server returns non-2xx HTTP status codes (401/403/404/5xx), the Streamable HTTP and SSE transports do not reliably propagate the error to the caller. In the Streamable HTTP transport, `post_writer` catches exceptions and logs them, but the caller blocks indefinitely waiting for a response on the read stream. HTTP 404 responses are also converted to `JSONRPCError(code=32600)`, losing the original HTTP status information.\n\n## Expected Behavior\n\n- Non-2xx HTTP responses should be surfaced as exceptions to the caller, not silently logged\n- The original HTTP status code should be preserved and accessible\n- Auth-related errors (401/403) should be distinguishable from other failures\n\n## Current Behavior\n\n- `post_writer` in Streamable HTTP transport catches and logs errors without forwarding them through the read stream\n- Callers hang indefinitely waiting for a response\n- HTTP 404 is converted to `JSONRPCError(code=32600)`, destroying HTTP-level context\n\n## Affected Code\n\n- `src/mcp/client/streamable_http.py` (post_writer)\n- `src/mcp/client/sse.py` (sse_reader)\n\n## Related\n\n- #1742 — broader typed error classes design","author":{"url":"https://github.com/maxisbey","@type":"Person","name":"maxisbey"},"datePublished":"2026-02-19T20:29:41Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/2110"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:483c0a94-ee65-d13d-f72f-11a6a5f25858
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC52:1F9C:8C3F4B:C35721:6B056CCE
html-safe-nonce76337f686ea498639303035d0073e62f229feea83af9305ac73a0d18004ac688
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzUyOjFGOUM6OEMzRjRCOkMzNTcyMTo2QjA1NkNDRSIsInZpc2l0b3JfaWQiOiIzODAyNDY2MjAyNTc2ODQxOTM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6c9a7683dd6668fb4e40c01432b4503b0258dbd9659e947dbdd025e813d83610
hovercard-subject-tagissue:3964945600
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/2110/issue_layout
twitter:imagehttps://opengraph.githubassets.com/841d3b1ce030a2274dfa5b55a48071e46c0be06bdb456f21e58f4062e9b69a6c/modelcontextprotocol/python-sdk/issues/2110
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/841d3b1ce030a2274dfa5b55a48071e46c0be06bdb456f21e58f4062e9b69a6c/modelcontextprotocol/python-sdk/issues/2110
og:image:altSummary When an MCP server returns non-2xx HTTP status codes (401/403/404/5xx), the Streamable HTTP and SSE transports do not reliably propagate the error to the caller. In the Streamable HTTP tran...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaxisbey
hostnamegithub.com
expected-hostnamegithub.com
None9b4256ac5f3e310e7945ef5b71c9cb9e264357b1eb20e91d369ed6502a4c486c
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef089e689ad324655ac44bf6cdbc04d976105b374
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/2110#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F2110
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F2110
Sign uphttps://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/2110
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/2110
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/2110
modelcontextprotocolhttps://redirect.github.com/modelcontextprotocol
python-sdkhttps://redirect.github.com/modelcontextprotocol/python-sdk
Codehttps://redirect.github.com/modelcontextprotocol/python-sdk
Issues320 (320)https://redirect.github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://redirect.github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://redirect.github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://redirect.github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://redirect.github.com/modelcontextprotocol/python-sdk/security
Insightshttps://redirect.github.com/modelcontextprotocol/python-sdk/insights
https://redirect.github.com/modelcontextprotocol/python-sdk
New issuehttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/2110
New issuehttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/2110
#3278https://github.com/modelcontextprotocol/python-sdk/pull/3278
HTTP transport swallows non-2xx status codes causing client to hanghttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/2110#top
#3278https://github.com/modelcontextprotocol/python-sdk/pull/3278
P1https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P1%22
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/maxisbey
maxisbeyhttps://github.com/maxisbey
on Feb 19, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issue-3964945600
Introduce typed error classes with metadata #1742https://github.com/modelcontextprotocol/python-sdk/issues/1742
maxisbeyhttps://redirect.github.com/maxisbey
bughttps://redirect.github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://redirect.github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
P1https://redirect.github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P1%22
on Feb 19, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#event-22928252197
https://redirect.github.com/kumar-pankaj0
kumar-pankaj0https://redirect.github.com/kumar-pankaj0
on Feb 22, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-3940307142
https://redirect.github.com/kumar-pankaj0
kumar-pankaj0https://redirect.github.com/kumar-pankaj0
on Feb 22, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-3940307297
kumar-pankaj0https://redirect.github.com/kumar-pankaj0
on Feb 22, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#event-22977409076
fix(client): propagate HTTP transport exceptions to callerhttps://github.com/kumar-pankaj0/python-sdk/commit/80d1386aaf684b0e0acf840ba6367c6766659ac4
80d1386https://github.com/kumar-pankaj0/python-sdk/commit/80d1386aaf684b0e0acf840ba6367c6766659ac4
https://redirect.github.com/chriscasola
chriscasolahttps://redirect.github.com/chriscasola
on Apr 2, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-4180001455
https://redirect.github.com/fortunexbt
fortunexbthttps://redirect.github.com/fortunexbt
on Apr 15, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-4252360475
@maxisbeyhttps://github.com/maxisbey
https://redirect.github.com/fede-kamel
fede-kamelhttps://redirect.github.com/fede-kamel
on Apr 20, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-4281865983
#2110https://github.com/modelcontextprotocol/python-sdk/issues/2110
#2110https://github.com/modelcontextprotocol/python-sdk/issues/2110
Introduce typed error classes with metadata #1742https://github.com/modelcontextprotocol/python-sdk/issues/1742
fix(client): propagate HTTP transport exceptions to caller #2124https://github.com/modelcontextprotocol/python-sdk/pull/2124
fix: preserve HTTP status code in streamable HTTP client error messages #2173https://github.com/modelcontextprotocol/python-sdk/pull/2173
fix: preserve HTTP status codes in streamable HTTP transport error responses #2176https://github.com/modelcontextprotocol/python-sdk/pull/2176
fix: propagate HTTP errors from transports instead of silently logging #2249https://github.com/modelcontextprotocol/python-sdk/pull/2249
Handle connection errors in StreamableHTTP post_writer #2282https://github.com/modelcontextprotocol/python-sdk/pull/2282
https://redirect.github.com/viswaskk
viswaskkhttps://redirect.github.com/viswaskk
on Apr 24, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-4312059685
PR #2483https://github.com/modelcontextprotocol/python-sdk/pull/2483
https://redirect.github.com/fede-kamel
fede-kamelhttps://redirect.github.com/fede-kamel
on Apr 24, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-4313849072
@maxisbeyhttps://github.com/maxisbey
#2483https://github.com/modelcontextprotocol/python-sdk/pull/2483
fede-kamelhttps://redirect.github.com/fede-kamel
on May 17, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#event-25629455663
fix(client): propagate HTTP transport errors to caller (modelcontextp…https://github.com/fede-kamel/python-sdk/commit/69691b814b6948c9adbae110a0cac35b0f359036
modelcontextp…https://github.com/modelcontextprotocol/python-sdk/issues/2110
69691b8https://github.com/fede-kamel/python-sdk/commit/69691b814b6948c9adbae110a0cac35b0f359036
fede-kamelhttps://redirect.github.com/fede-kamel
on Jun 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#event-26293525050
fix(client): propagate SSE POST errors to caller instead of hanginghttps://github.com/fede-kamel/python-sdk/commit/31c4268e98710b580e3326f111b45ad41b597fdb
31c4268https://github.com/fede-kamel/python-sdk/commit/31c4268e98710b580e3326f111b45ad41b597fdb
fix(client): propagate SSE POST errors to caller instead of hanginghttps://github.com/fede-kamel/python-sdk/commit/ef8edd695751fc2c7b5d2e06369f30c8de2bb860
ef8edd6https://github.com/fede-kamel/python-sdk/commit/ef8edd695751fc2c7b5d2e06369f30c8de2bb860
https://redirect.github.com/alex-feel
alex-feelhttps://redirect.github.com/alex-feel
on Oct 20, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-6285489934
streamable_http.py L383-L414 at v2.2.0https://github.com/modelcontextprotocol/python-sdk/blob/9972c21aa42054fb1450c5fc614761ed11847ec6/src/mcp/client/streamable_http.py#L383-L414
L398-L429 on mainhttps://github.com/modelcontextprotocol/python-sdk/blob/2af9e3089ac66b35c1550c500aae86a82efb1e17/src/mcp/client/streamable_http.py#L398-L429
2af9e30https://github.com/modelcontextprotocol/python-sdk/commit/2af9e3089ac66b35c1550c500aae86a82efb1e17
#3094https://github.com/modelcontextprotocol/python-sdk/pull/3094
https://redirect.github.com/Mart22052006
Mart22052006https://redirect.github.com/Mart22052006
on Oct 28, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-6458241572
52e64ddhttps://github.com/modelcontextprotocol/python-sdk/commit/52e64ddb9f8f897bcb74de0bc9417f820af35a59
#3278https://github.com/modelcontextprotocol/python-sdk/pull/3278
fix/v1.x-sse-post-errorhttps://github.com/modelcontextprotocol/python-sdk/compare/v1.x...Mart22052006:python-sdk:fix/v1.x-sse-post-error
https://redirect.github.com/priyashan2204
priyashan2204https://redirect.github.com/priyashan2204
on Oct 28, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-6461208426
#3094https://github.com/modelcontextprotocol/python-sdk/pull/3094
https://redirect.github.com/Darshak03
Darshak03https://redirect.github.com/Darshak03
on Nov 22, 2026https://github.com/modelcontextprotocol/python-sdk/issues/2110#issuecomment-7078665259
#3892https://github.com/modelcontextprotocol/python-sdk/pull/3892
#3278https://github.com/modelcontextprotocol/python-sdk/pull/3278
#3892https://github.com/modelcontextprotocol/python-sdk/pull/3892
Sign up for freehttps://redirect.github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/2110
Sign in to commenthttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/2110
P1https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P1%22
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.