Exception: Flox::ServiceError

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

Overview

Raised when the REST service encounters an error (e.g. the server returns a HTTP code >= 400).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ServiceError

Returns a new instance of ServiceError.

Parameters:

  • response (Net::HTTPResponse)

    the complete server response



16
17
18
# File 'lib/flox/errors.rb', line 16

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseNet::HTTPResponse (readonly)

Returns the complete server response.

Returns:

  • (Net::HTTPResponse)

    the complete server response



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

def response
  @response
end