Exception: MCPClient::Errors::MethodNotFoundError

Inherits:
ServerError show all
Defined in:
lib/mcp_client/errors.rb

Overview

-32601 Method not found. A class of its own so that the Streamable HTTP backward-compatibility rule ("HTTP 404 with a JSON-RPC -32601 body is a modern server") can require a well-formed JSON-RPC error object the same way the reserved -3202x codes do: from_jsonrpc assigns this class only when the error carries a string message.

Instance Attribute Summary

Attributes inherited from ServerError

#code, #data, #http_status

Instance Method Summary collapse

Methods inherited from ServerError

from_jsonrpc, #initialize, #modern_protocol_error?, #modern_protocol_error_for_probe?, #protocol_error?, #well_formed?

Methods inherited from MCPError

#era_inconclusive?

Constructor Details

This class inherits a constructor from MCPClient::Errors::ServerError

Instance Method Details

#modern_http_protocol_error? ⇒ Boolean

Returns whether this arrived as an HTTP 404, the pairing Streamable HTTP names as a modern-server signal.

Returns:

  • (Boolean) —

    whether this arrived as an HTTP 404, the pairing Streamable HTTP names as a modern-server signal



297
298
299
# File 'lib/mcp_client/errors.rb', line 297

def modern_http_protocol_error?
  http_status == 404
end