Exception: Kinu::HttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Kinu::HttpError
- Defined in:
- lib/kinu/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ HttpError
constructor
A new instance of HttpError.
Constructor Details
#initialize(response) ⇒ HttpError
Returns a new instance of HttpError.
13 14 15 16 17 |
# File 'lib/kinu/errors.rb', line 13 def initialize(response) @response = response @status = response.status super("status: #{status}, response: #{response.body}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/kinu/errors.rb', line 11 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/kinu/errors.rb', line 11 def status @status end |