Exception: Tryiton::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Tryiton::Error
- Defined in:
- lib/tryiton/client.rb
Overview
Raised for API-level errors and runtime (job) failures.
status - HTTP status code, or nil for a runtime job failure.
error_name - the API error name, e.g. "OutOfCredits" / "ProcessingError".
Instance Attribute Summary collapse
-
#error_name ⇒ Object
readonly
Returns the value of attribute error_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, error_name: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status: nil, error_name: nil) ⇒ Error
Returns a new instance of Error.
15 16 17 18 19 |
# File 'lib/tryiton/client.rb', line 15 def initialize(, status: nil, error_name: nil) super() @status = status @error_name = error_name end |
Instance Attribute Details
#error_name ⇒ Object (readonly)
Returns the value of attribute error_name.
13 14 15 |
# File 'lib/tryiton/client.rb', line 13 def error_name @error_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/tryiton/client.rb', line 13 def status @status end |