Exception: IbanClient::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/iban_client/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#iban

Instance Method Summary collapse

Constructor Details

#initialize(iban:, response:) ⇒ RequestError

Returns a new instance of RequestError.



13
14
15
16
# File 'lib/iban_client/errors.rb', line 13

def initialize(iban:, response:)
  @response = response
  super(iban: iban)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/iban_client/errors.rb', line 11

def response
  @response
end

Instance Method Details

#messageObject



18
19
20
21
22
# File 'lib/iban_client/errors.rb', line 18

def message
  "#{initial_error.message}\n"\
  "Request iban: #{iban}\n"\
  "Response: #{response}"
end