Exception: Orderspace::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/orderspace/error.rb

Overview

Basic Error representing the possible errors that can happen during our communication with the API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RequestError

Returns a new instance of RequestError.



19
20
21
22
# File 'lib/orderspace/error.rb', line 19

def initialize(response)
  @response = response
  super(message_from(response))
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



17
18
19
# File 'lib/orderspace/error.rb', line 17

def message
  @message
end

#responseObject (readonly)

Returns the value of attribute response.



17
18
19
# File 'lib/orderspace/error.rb', line 17

def response
  @response
end