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.
Instance Attribute Summary collapse
-
#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) ⇒ 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) ⇒ ApplicationError
Create an application error.
56 57 58 59 60 61 62 |
# File 'lib/temporalio/error/failure.rb', line 56 def initialize(, *details, type: nil, non_retryable: false, next_retry_delay: nil) super() @details = details @type = type @non_retryable = non_retryable @next_retry_delay = next_retry_delay end |
Instance Attribute Details
#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.
65 66 67 |
# File 'lib/temporalio/error/failure.rb', line 65 def retryable? !@non_retryable end |