Fix: handle 204 No Content response in MCP client (#25040)

This commit is contained in:
dswl23
2025-09-03 15:22:42 +08:00
committed by GitHub
parent 462e764a3c
commit dabf266048

View File

@@ -246,6 +246,10 @@ class StreamableHTTPTransport:
logger.debug("Received 202 Accepted")
return
if response.status_code == 204:
logger.debug("Received 204 No Content")
return
if response.status_code == 404:
if isinstance(message.root, JSONRPCRequest):
self._send_session_terminated_error(