Class: Faraday::RedirectLimitReached

Inherits:
Error::ClientError
  • Object
show all
Defined in:
lib/faraday/follow_redirects.rb

Overview

Public: 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.



34
35
36
37
# File 'lib/faraday/follow_redirects.rb', line 34

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.



32
33
34
# File 'lib/faraday/follow_redirects.rb', line 32

def response
  @response
end