Module: MCPClient::Errors::ModernProtocolError
- Included in:
- HeaderMismatchError, MissingRequiredClientCapabilityError, UnsupportedProtocolVersionError
- Defined in:
- lib/mcp_client/errors.rb
Overview
Recognition shared by the three 2026-07-28 spec-defined errors. Only
ServerError.from_jsonrpc assigns these classes, and only to an error
object that is well-formed at the JSON-RPC level (it carries a string
message); #well_formed? adds the per-code data requirements from the
spec's schema.
Instance Method Summary collapse
-
#modern_protocol_error? ⇒ Boolean
Whether the error identifies a modern (2026-07-28+) server.
Instance Method Details
#modern_protocol_error? ⇒ Boolean
Returns whether the error identifies a modern (2026-07-28+) server.
284 285 286 |
# File 'lib/mcp_client/errors.rb', line 284 def modern_protocol_error? Codes.modern_error_code?(code) && well_formed? end |