Exception: Minisky::UnexpectedRedirect
- Inherits:
-
BadResponse
- Object
- StandardError
- Error
- BadResponse
- Minisky::UnexpectedRedirect
- Defined in:
- lib/minisky/errors.rb
Overview
Raised when the API returns a redirect status code (3xx). Minisky doesn't currently follow any redirects.
Instance Attribute Summary collapse
-
#location ⇒ String
readonly
Value of the "Location" header.
Attributes inherited from BadResponse
Instance Method Summary collapse
-
#initialize(status, status_message, location) ⇒ UnexpectedRedirect
constructor
A new instance of UnexpectedRedirect.
Methods inherited from BadResponse
Constructor Details
#initialize(status, status_message, location) ⇒ UnexpectedRedirect
Returns a new instance of UnexpectedRedirect.
88 89 90 91 |
# File 'lib/minisky/errors.rb', line 88 def initialize(status, , location) super(status, , { 'message' => "Unexpected redirect: #{location}" }) @location = location end |
Instance Attribute Details
#location ⇒ String (readonly)
Returns value of the "Location" header.
82 83 84 |
# File 'lib/minisky/errors.rb', line 82 def location @location end |