Class: FaradayMiddleware::RedirectLimitReached

Inherits:
Faraday::ClientError
  • Object
show all
Defined in:
lib/faraday_middleware/redirect_limit_reached.rb

Overview

Exception thrown when the maximum amount of requests is exceeded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RedirectLimitReached

Returns a new instance of RedirectLimitReached.



11
12
13
14
# File 'lib/faraday_middleware/redirect_limit_reached.rb', line 11

def initialize(response)
  super "too many redirects; last one to: #{response['location']}"
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/faraday_middleware/redirect_limit_reached.rb', line 9

def response
  @response
end