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
commit f745d69dcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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}")