fix: 204 is an acceptable response to DELETEing the session (#697)

This commit is contained in:
Nate Barbettini
2025-05-12 13:22:55 -07:00
committed by GitHub
parent 76919cfaa4
commit f745d69dcb
2 changed files with 67 additions and 1 deletions

View File

@@ -410,7 +410,7 @@ class StreamableHTTPTransport:
if response.status_code == 405:
logger.debug("Server does not allow session termination")
elif response.status_code != 200:
elif response.status_code not in (200, 204):
logger.warning(f"Session termination failed: {response.status_code}")
except Exception as exc:
logger.warning(f"Session termination failed: {exc}")