Skip to content

[JsonRpc][Server] Introduce UnknownMethodException to replace message-string check - #40

Closed
chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-18-unknown-method-exception
Closed

chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-18-unknown-method-exception

Conversation

@chr-hertel

Copy link
Copy Markdown
Owner

MessageFactory now throws UnknownMethodException (extends InvalidInputMessageException, so existing catches keep working) for unregistered methods, and StatelessProtocol::dispatch() decides 404 vs 400 by instanceof instead of comparing the exception's message string. Closes #18

Confidence: 9/10 — small, type-preserving change; full unit suite, cs-fixer and phpstan all green.

@chr-hertel

chr-hertel commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner Author

Done upstream with modelcontextprotocol#681.

@chr-hertel chr-hertel closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[B4] Stringly-typed control flow across a module boundary

1 participant