Merge pull request #260 from koic/use_missing_session_id_response_helper_in_handle_delete

Use `missing_session_id_response` method in `handle_delete`
This commit is contained in:
Koichi ITO 2026-03-18 12:47:40 +09:00 • committed by GitHub
commit 283c7a43e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,13 +154,7 @@ module MCP
return success_response
end
session_id = request.env["HTTP_MCP_SESSION_ID"]
return [
400,
{ "Content-Type" => "application/json" },
[{ error: "Missing session ID" }.to_json],
] unless session_id
return missing_session_id_response unless (session_id = request.env["HTTP_MCP_SESSION_ID"])
cleanup_session(session_id)
success_response