Exception: RightSupport::Net::NoResult

Inherits:
StandardError
  • Object
show all
Defined in:
lib/right_support/net/request_balancer.rb

Overview

Raised to indicate the (uncommon) error condition where a RequestBalancer rotated through EVERY URL in a list without getting a non-nil, non-timeout response.

If the NoResult was due to a series of errors, then the #details attribute of this exception will let you access detailed information about the errors encountered while retrying the network request. #details is a Hash, the keys of which are endpoints, and the values of which are arrays of exceptions that we encountered while making requests to that endpoint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, details = {}) ⇒ NoResult

Returns a new instance of NoResult.



38
39
40
41
# File 'lib/right_support/net/request_balancer.rb', line 38

def initialize(message, details={})
  super(message)
  @details = details
end

Instance Attribute Details

#detailsHash (readonly)

Returns a map of => [exception_1, exception2, …], ….

Returns:

  • (Hash)

    a map of => [exception_1, exception2, …], …



36
37
38
# File 'lib/right_support/net/request_balancer.rb', line 36

def details
  @details
end