Exception: OpenBankingIO::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- OpenBankingIO::HTTPError
- Defined in:
- lib/open_banking_io/client.rb
Overview
Raised when the API returns a non-success HTTP status.
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(status, body) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(status, body) ⇒ HTTPError
Returns a new instance of HTTPError.
16 17 18 19 20 |
# File 'lib/open_banking_io/client.rb', line 16 def initialize(status, body) @status = status @body = body super("open-banking.io request failed with HTTP #{status}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
14 15 16 |
# File 'lib/open_banking_io/client.rb', line 14 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/open_banking_io/client.rb', line 14 def status @status end |