Exception: Aha::Auth::ApiError
- Defined in:
- lib/aha/auth/errors.rb
Overview
Raised for API errors from the server
Direct Known Subclasses
BadRequestError, ForbiddenError, NotFoundError, UnauthorizedError
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(message, status: nil, body: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status: nil, body: nil) ⇒ ApiError
Returns a new instance of ApiError.
44 45 46 47 48 |
# File 'lib/aha/auth/errors.rb', line 44 def initialize(, status: nil, body: nil) super() @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
42 43 44 |
# File 'lib/aha/auth/errors.rb', line 42 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
42 43 44 |
# File 'lib/aha/auth/errors.rb', line 42 def status @status end |