Exception: ForestAdminDatasourceMambuPayments::APIError

Inherits:
Error
  • Object
show all
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

Instance Method Summary collapse

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(message, status: nil, body: nil)
  super(message)
  @status = status
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



20
21
22
# File 'lib/forest_admin_datasource_mambu_payments.rb', line 20

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



20
21
22
# File 'lib/forest_admin_datasource_mambu_payments.rb', line 20

def status
  @status
end