Exception: Walletone::ErrorResponse

Inherits:
StandardError
  • Object
show all
Defined in:
lib/walletone/error_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



3
4
5
6
# File 'lib/walletone/error_response.rb', line 3

def initialize(response)
  fail 'Must be a Net::HTTPInternalServerError' unless response.is_a? Net::HTTPInternalServerError
  @response = response
end

Instance Method Details

#messageObject



8
9
10
# File 'lib/walletone/error_response.rb', line 8

def message
  "[#{response.code}] #{response.body}"
end