Exception: OpenBankingIO::HTTPError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/open_banking_io/client.rb

Overview

Raised when the API returns a non-success HTTP status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, body) ⇒ HTTPError

Returns a new instance of HTTPError.



17
18
19
20
21
# File 'lib/open_banking_io/client.rb', line 17

def initialize(status, body)
  @status = status
  @body = body
  super("open-banking.io request failed with HTTP #{status}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



15
16
17
# File 'lib/open_banking_io/client.rb', line 15

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



15
16
17
# File 'lib/open_banking_io/client.rb', line 15

def status
  @status
end