Add warning log when rejecting request with unknown/expired session ID (#2212)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
This commit is contained in:
Ramesh Reddy Adutla 2026-03-06 16:55:37 +00:00 • committed by GitHub
commit eaf971cf25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,6 +272,7 @@ class StreamableHTTPSessionManager:
# Unknown or expired session ID - return 404 per MCP spec
# TODO: Align error code once spec clarifies
# See: https://github.com/modelcontextprotocol/python-sdk/issues/1821
logger.info(f"Rejected request with unknown or expired session ID: {request_mcp_session_id[:64]}")
error_response = JSONRPCError(
jsonrpc="2.0",
id=None,