Exception: Temporalio::Error::ApplicationError

Inherits:
Failure show all
Defined in:
lib/temporalio/error/failure.rb

Overview

Error raised during workflow/activity execution.

Instance Attribute Summary collapse

Attributes inherited from Failure

#raw

Instance Method Summary collapse

Methods inherited from Failure

#cause

Constructor Details

#initialize(message, type:, details: [], non_retryable: false, raw: nil, cause: nil) ⇒ ApplicationError

Returns a new instance of ApplicationError.



34
35
36
37
38
39
40
# File 'lib/temporalio/error/failure.rb', line 34

def initialize(message, type:, details: [], non_retryable: false, raw: nil, cause: nil)
  super(message, raw: raw, cause: cause)

  @type = type
  @details = details
  @non_retryable = non_retryable
end

Instance Attribute Details

#detailsArray<any> (readonly)

Returns User-defined details on the error.

Returns:

  • (Array<any>)

    User-defined details on the error.



29
30
31
# File 'lib/temporalio/error/failure.rb', line 29

def details
  @details
end

#non_retryableBool (readonly)

Returns Whether the error is non-retryable.

Returns:

  • (Bool)

    Whether the error is non-retryable.



32
33
34
# File 'lib/temporalio/error/failure.rb', line 32

def non_retryable
  @non_retryable
end

#typeString (readonly)

Returns General error type.

Returns:

  • (String)

    General error type.



26
27
28
# File 'lib/temporalio/error/failure.rb', line 26

def type
  @type
end

Instance Method Details

#retryable?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/temporalio/error/failure.rb', line 42

def retryable?
  !non_retryable
end