Skip to content

[Server] Answer an unavailable session lock like an unavailable session store - #603

Merged
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:align-unavailable-session-errors
Oct 15, 2026
Merged

chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:align-unavailable-session-errors

Conversation

@chr-hertel

Copy link
Copy Markdown
Member

Follow-up to #570 & #584: both answer an unavailable backend with 503, but in two dialects - a failing session store with -32603 "Session store is unavailable.", a failing session lock with -32000 "The session lock is unavailable.".

  • A failing session lock is answered with -32603 and "Session lock is unavailable.", same as the store and the lock's own log line
  • A busy session stays -32000 "Another request of this session is still being processed."

Both are unreleased, so nothing breaks.

@chr-hertel chr-hertel added this to the 0.9.0 milestone Oct 14, 2026
@chr-hertel chr-hertel added Server Issues & PRs related to the Server component improves sdk consistency Improves consistency with other SDKs such as Tyepscript labels Oct 14, 2026
@chr-hertel
chr-hertel requested a balanced review from Copilot October 14, 2026 23:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused change preserves timeout behavior and includes matching test assertions and documentation updates.

0 open findings

What changed in this PR

Aligns unavailable session-lock responses with session-store failures while preserving busy-session behavior.

Changes:

  • Returns JSON-RPC -32603 with “Session lock is unavailable.” for backend failures, retaining HTTP 503.
  • Updates regression assertions and documentation; busy sessions remain -32000.
File Description
tests/​Unit/​Server/​ProtocolSessionLockTest.php Updates expected error code and message.
src/​Server/​Protocol.php Distinguishes backend failures from busy-session errors.
docs/​run/​sessions.md Documents the revised failure message.
CHANGELOG.md Records alignment with session-store failures.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chr-hertel
chr-hertel merged commit 5b20b8d into modelcontextprotocol:main Oct 15, 2026
28 checks passed
@chr-hertel
chr-hertel deleted the align-unavailable-session-errors branch October 15, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improves sdk consistency Improves consistency with other SDKs such as Tyepscript Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants