Fix: handle 204 No Content response in MCP client (#25040)
This commit is contained in:
@@ -246,6 +246,10 @@ class StreamableHTTPTransport:
|
|||||||
logger.debug("Received 202 Accepted")
|
logger.debug("Received 202 Accepted")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if response.status_code == 204:
|
||||||
|
logger.debug("Received 204 No Content")
|
||||||
|
return
|
||||||
|
|
||||||
if response.status_code == 404:
|
if response.status_code == 404:
|
||||||
if isinstance(message.root, JSONRPCRequest):
|
if isinstance(message.root, JSONRPCRequest):
|
||||||
self._send_session_terminated_error(
|
self._send_session_terminated_error(
|
||||||
|
Reference in New Issue
Block a user