Class: McpToolkit::Gateway::Client::Error
- Inherits:
-
Error
- Object
- Error
- McpToolkit::Gateway::Client::Error
- Defined in:
- lib/mcp_toolkit/gateway/client.rb
Overview
Raised for any upstream failure. jsonrpc_error carries an upstream JSON-RPC
error hash when the failure was a protocol-level error response, so a proxy
can relay it verbatim; nil for transport/HTTP failures. http_status carries
the HTTP status for a non-2xx response (nil otherwise), so callers can
distinguish a session-loss 404 from other failures. This class references NO
transport/protocol-error type — the consumer maps it.
Instance Attribute Summary collapse
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#jsonrpc_error ⇒ Object
readonly
Returns the value of attribute jsonrpc_error.
Instance Method Summary collapse
-
#initialize(message, jsonrpc_error: nil, http_status: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, jsonrpc_error: nil, http_status: nil) ⇒ Error
Returns a new instance of Error.
59 60 61 62 63 |
# File 'lib/mcp_toolkit/gateway/client.rb', line 59 def initialize(, jsonrpc_error: nil, http_status: nil) super() @jsonrpc_error = jsonrpc_error @http_status = http_status end |
Instance Attribute Details
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
57 58 59 |
# File 'lib/mcp_toolkit/gateway/client.rb', line 57 def http_status @http_status end |
#jsonrpc_error ⇒ Object (readonly)
Returns the value of attribute jsonrpc_error.
57 58 59 |
# File 'lib/mcp_toolkit/gateway/client.rb', line 57 def jsonrpc_error @jsonrpc_error end |