Exception: Temporalio::Error::ApplicationError
- Inherits:
-
Failure
- Object
- StandardError
- Temporalio::Error
- Failure
- Temporalio::Error::ApplicationError
- Defined in:
- lib/temporalio/error/failure.rb
Overview
Error raised during workflow/activity execution.
Defined Under Namespace
Modules: Category
Instance Attribute Summary collapse
-
#category ⇒ Category
readonly
Error category.
-
#details ⇒ Array<Object, nil>
readonly
User-defined details on the error.
-
#next_retry_delay ⇒ Float?
readonly
Delay in seconds before the next activity retry attempt.
-
#non_retryable ⇒ Boolean
readonly
whether the error was marked non-retryable upon creation by the user.
-
#type ⇒ String?
readonly
General error type.
Instance Method Summary collapse
-
#initialize(message, *details, type: nil, non_retryable: false, next_retry_delay: nil, category: Category::UNSPECIFIED) ⇒ ApplicationError
constructor
Create an application error.
-
#retryable? ⇒ Boolean
Inverse of #non_retryable.
Methods inherited from Temporalio::Error
Constructor Details
#initialize(message, *details, type: nil, non_retryable: false, next_retry_delay: nil, category: Category::UNSPECIFIED) ⇒ ApplicationError
Create an application error.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/temporalio/error/failure.rb', line 60 def initialize( , *details, type: nil, non_retryable: false, next_retry_delay: nil, category: Category::UNSPECIFIED ) super() @details = details @type = type @non_retryable = non_retryable @next_retry_delay = next_retry_delay @category = category end |
Instance Attribute Details
#category ⇒ Category (readonly)
Returns Error category.
50 51 52 |
# File 'lib/temporalio/error/failure.rb', line 50 def category @category end |
#details ⇒ Array<Object, nil> (readonly)
Returns User-defined details on the error.
35 36 37 |
# File 'lib/temporalio/error/failure.rb', line 35 def details @details end |
#next_retry_delay ⇒ Float? (readonly)
Returns Delay in seconds before the next activity retry attempt.
47 48 49 |
# File 'lib/temporalio/error/failure.rb', line 47 def next_retry_delay @next_retry_delay end |
#non_retryable ⇒ Boolean (readonly)
Note:
This is not whether the error is non-retryable via other means such as retry policy. This is just
whether the error was marked non-retryable upon creation by the user.
44 45 46 |
# File 'lib/temporalio/error/failure.rb', line 44 def non_retryable @non_retryable end |
#type ⇒ String? (readonly)
Returns General error type.
38 39 40 |
# File 'lib/temporalio/error/failure.rb', line 38 def type @type end |
Instance Method Details
#retryable? ⇒ Boolean
Returns Inverse of #non_retryable.
77 78 79 |
# File 'lib/temporalio/error/failure.rb', line 77 def retryable? !@non_retryable end |