Exception: MonogotoApi::HTTPError
- Defined in:
- lib/monogoto_api/errors.rb
Overview
Base class for HTTP errors (non-2xx responses)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
14 15 16 17 |
# File 'lib/monogoto_api/errors.rb', line 14 def initialize(response) @response = response super("HTTP Request failed with status #{response.code}: #{response.body}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/monogoto_api/errors.rb', line 12 def response @response end |