Exception: SynergyWholesale::Errors::ResponseError

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

Instance Attribute Summary collapse

Attributes inherited from Error

#command, #response

Class Method Summary collapse

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/synergy_wholesale/errors/response_error.rb', line 5

def status
  @status
end

Class Method Details

.new(command, response) ⇒ Object



7
8
9
10
11
12
# File 'lib/synergy_wholesale/errors/response_error.rb', line 7

def self.new(command, response)
  @status = response[:status]
  message = response[:error_message] || @status

  super(message, command, response)
end