Class: Hyperkit::Middleware::RedirectLimitReached

Inherits:
Faraday::Error::ClientError
  • Object
show all
Defined in:
lib/hyperkit/middleware/follow_redirects.rb

Overview

Public: Exception thrown when the maximum amount of requests is exceeded.

Taken from Octokit, which was originally adapted from github.com/lostisland/faraday_middleware/blob/138766e/lib/faraday_middleware/response/follow_redirects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RedirectLimitReached


16
17
18
19
# File 'lib/hyperkit/middleware/follow_redirects.rb', line 16

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


14
15
16
# File 'lib/hyperkit/middleware/follow_redirects.rb', line 14

def response
  @response
end