Exception: AnswerLayer::ApiError
- Defined in:
- lib/answerlayer/errors.rb
Overview
HTTP API errors.
Direct Known Subclasses
BadRequestError, ConflictError, ForbiddenError, GoneError, NotFoundError, OAuthError, RateLimitError, ServerError, UnauthorizedError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status:, body: nil, headers: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status:, body: nil, headers: nil) ⇒ ApiError
Returns a new instance of ApiError.
17 18 19 20 21 22 |
# File 'lib/answerlayer/errors.rb', line 17 def initialize(, status:, body: nil, headers: nil) @status = status @body = body @headers = headers super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
15 16 17 |
# File 'lib/answerlayer/errors.rb', line 15 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
15 16 17 |
# File 'lib/answerlayer/errors.rb', line 15 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
15 16 17 |
# File 'lib/answerlayer/errors.rb', line 15 def status @status end |