Exception: PaprikaClient::HTTPError
- Defined in:
- lib/paprika_client/errors.rb
Overview
Raised when the API responds with a non-success HTTP status.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(status, body) ⇒ HTTPError
Returns a new instance of HTTPError.
11 12 13 14 15 |
# File 'lib/paprika_client/errors.rb', line 11 def initialize(status, body) @status = status @body = body super("Paprika API returned HTTP #{status}: #{body}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/paprika_client/errors.rb', line 9 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/paprika_client/errors.rb', line 9 def status @status end |