Exception: A2A::RestError
- Defined in:
- lib/a2a/errors/rest_error.rb
Overview
Raised by the REST response middleware when the server returns an HTTP 4xx/5xx with an application/problem+json body. Preserves the HTTP status, title/message, and optional detail array.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #error_data ⇒ Object
-
#initialize(message, http_status:, data: nil) ⇒ RestError
constructor
A new instance of RestError.
Methods inherited from Error
Constructor Details
#initialize(message, http_status:, data: nil) ⇒ RestError
Returns a new instance of RestError.
12 13 14 15 |
# File 'lib/a2a/errors/rest_error.rb', line 12 def initialize(, http_status:, data: nil) @wire_data = data super(, code: http_status, http_status: http_status) end |
Instance Method Details
#error_data ⇒ Object
17 18 19 |
# File 'lib/a2a/errors/rest_error.rb', line 17 def error_data @wire_data end |