Exception: Rentlinx::HTTPError

Inherits:
RentlinxError show all
Defined in:
lib/rentlinx/errors.rb

Overview

A general class of errors for handling issues in the communication with Rentlinx. To be inherited from, or thrown when the server returns a code not otherwise handled.

Direct Known Subclasses

BadRequest, Conflict, Forbidden, NotFound, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, msg = nil) ⇒ HTTPError

Returns a new instance of HTTPError.



49
50
51
52
# File 'lib/rentlinx/errors.rb', line 49

def initialize(response, msg = nil)
  @response = response
  super(msg.nil? ? 'Received an unexpected response from the server' : msg)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



47
48
49
# File 'lib/rentlinx/errors.rb', line 47

def response
  @response
end