Exception: Doohly::APIError
- Defined in:
- lib/doohly/error.rb
Overview
Raised when API request fails
Direct Known Subclasses
AuthenticationError, BadRequestError, NotFoundError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, body: nil, response: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status: nil, body: nil, response: nil) ⇒ APIError
Returns a new instance of APIError.
11 12 13 14 15 16 |
# File 'lib/doohly/error.rb', line 11 def initialize(, status: nil, body: nil, response: nil) @status = status @body = body @response = response super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/doohly/error.rb', line 9 def body @body end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/doohly/error.rb', line 9 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/doohly/error.rb', line 9 def status @status end |