Exception: Anakin::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Anakin::Error
- Defined in:
- lib/anakin/errors.rb
Overview
Base type for all errors raised by the SDK. Rescue a specific subclass for fine-grained handling, or this base class for a generic fallback.
Direct Known Subclasses
AuthenticationError, InsufficientCreditsError, InvalidRequestError, JobFailedError, JobTimeoutError, NetworkError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: 0, code: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status: 0, code: nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 |
# File 'lib/anakin/errors.rb', line 7 def initialize(, status: 0, code: nil) super() @status = status @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/anakin/errors.rb', line 5 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/anakin/errors.rb', line 5 def status @status end |