Exception: ForestAdminDatasourceMambuPayments::APIError
- Defined in:
- lib/forest_admin_datasource_mambu_payments.rb
Overview
Raised when a Numeral API call fails. Carries the HTTP status and the (parsed) response body so callers — smart actions in particular — can surface the API’s own validation message instead of a generic string.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, body: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status: nil, body: nil) ⇒ APIError
Returns a new instance of APIError.
22 23 24 25 26 |
# File 'lib/forest_admin_datasource_mambu_payments.rb', line 22 def initialize(, status: nil, body: nil) super() @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
20 21 22 |
# File 'lib/forest_admin_datasource_mambu_payments.rb', line 20 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
20 21 22 |
# File 'lib/forest_admin_datasource_mambu_payments.rb', line 20 def status @status end |