Exception: HTTP::StatusError
- Inherits:
-
ResponseError
- Object
- StandardError
- Error
- ResponseError
- HTTP::StatusError
- Defined in:
- lib/http/errors.rb
Overview
When status code indicates an error
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ StatusError
constructor
A new instance of StatusError.
Constructor Details
#initialize(response) ⇒ StatusError
Returns a new instance of StatusError.
28 29 30 31 32 |
# File 'lib/http/errors.rb', line 28 def initialize(response) @response = response super("Unexpected status code #{response.code}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
26 27 28 |
# File 'lib/http/errors.rb', line 26 def response @response end |