Use missing_session_id_response method in handle_delete
## Motivation and Context `handle_delete` had an inline error response for "Missing session ID" that was identical to the existing `missing_session_id_response` helper method. `handle_get` already uses this helper for the same purpose. ## How Has This Been Tested? All existing tests pass. The behavior is unchanged. ## Breaking Change None.
This commit is contained in:
parent
f4aab5cdf0
commit
75d03f334e
1 changed files with 1 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue