Exception: A2A::JsonRpcError
- Defined in:
- lib/a2a/errors/json_rpc_error.rb
Overview
Raised by the JSON-RPC response middleware when the server returns a JSON-RPC 2.0 error envelope. Preserves the wire code, message, and optional structured data array.
JSON-RPC errors are always delivered over HTTP 200 — the error lives inside the JSON-RPC envelope, not the HTTP status.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_data ⇒ Object
-
#initialize(message, code:, data: nil) ⇒ JsonRpcError
constructor
A new instance of JsonRpcError.
Methods inherited from Error
Constructor Details
#initialize(message, code:, data: nil) ⇒ JsonRpcError
Returns a new instance of JsonRpcError.
15 16 17 18 |
# File 'lib/a2a/errors/json_rpc_error.rb', line 15 def initialize(, code:, data: nil) @wire_data = data super(, code: code, http_status: 200) end |
Instance Method Details
#error_data ⇒ Object
20 21 22 |
# File 'lib/a2a/errors/json_rpc_error.rb', line 20 def error_data @wire_data end |