Exception: BellaBaxter::ApiError
- Defined in:
- lib/bella_baxter/errors.rb
Overview
Raised when the server returns a non-2xx response.
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) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(status, body) ⇒ ApiError
Returns a new instance of ApiError.
13 14 15 16 17 |
# File 'lib/bella_baxter/errors.rb', line 13 def initialize(status, body) @status = status @body = body super("Bella Baxter API error #{status}: #{body}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/bella_baxter/errors.rb', line 11 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/bella_baxter/errors.rb', line 11 def status @status end |