Repository navigation
[Server] Answer an unreachable session store with 503 instead of 404 - #570
Merged
chr-hertel merged 2 commits intoOct 13, 2026
Merged
Conversation
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
October 10, 2026 01:54
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The 503 JSON-RPC response loses known request IDs and responds to notification-only input.
1 open finding
What changed in this PR
Updates session-store outage handling so clients receive a logged 503 instead of an erroneous 404.
Changes:
- Adds
SessionStoreExceptionand propagates cache failures. - Converts session-store failures into HTTP 503 responses.
- Adds unit tests and changelog documentation.
| File | Description |
|---|---|
CHANGELOG.md |
Documents the corrected outage behavior. |
src/Exception/SessionStoreException.php |
Defines the new exception. |
src/Server/Protocol.php |
Logs store failures and returns 503. |
src/Server/Session/Psr16SessionStore.php |
Throws on cache availability failures. |
src/Server/Session/SessionStoreInterface.php |
Documents the exception contract. |
tests/Unit/Server/ProtocolTest.php |
Tests 503 and logging behavior. |
tests/Unit/Server/Session/Psr16SessionStoreTest.php |
Tests missing sessions and cache failures. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
soyuka
previously approved these changes
Oct 13, 2026
chr-hertel
force-pushed
the
fix-session-store-outage
branch
from
October 13, 2026 21:31
a147d27 to
106292b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

While the cache behind
Psr16SessionStoreis down, every request gets a404and nothing is logged - clients re-initialize instead of retrying.Psr16SessionStore::exists()throws the newSessionStoreExceptioninstead of returningfalseon a cache failureProtocollogs it and answers with an internal error and503Fixes chr-hertel#64
🤖 Generated with Claude Code