Exception: Kortana::APIError
- Defined in:
- lib/kortana/errors.rb
Direct Known Subclasses
AuthError, ConflictError, NotFoundError, RateLimitError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
-
#initialize(message, code: nil, request_id: nil, http_status: nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, code: nil, request_id: nil, http_status: nil) ⇒ APIError
Returns a new instance of APIError.
8 9 10 11 12 13 |
# File 'lib/kortana/errors.rb', line 8 def initialize(, code: nil, request_id: nil, http_status: nil) super() @code = code @request_id = request_id @http_status = http_status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/kortana/errors.rb', line 6 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
6 7 8 |
# File 'lib/kortana/errors.rb', line 6 def http_status @http_status end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
6 7 8 |
# File 'lib/kortana/errors.rb', line 6 def request_id @request_id end |