Skip to main content

Class: TemporalFailure

common.TemporalFailure

Represents failures that can cross Workflow and Activity boundaries.

Only exceptions that extend this class will be propagated to the caller.

Never extend this class or any of its derivatives. They are to be used by the SDK code only. Throw an instance ApplicationFailure to pass application specific errors between Workflows and Activities.

Any unhandled exception thrown by an Activity or Workflow will be converted to an instance of ApplicationFailure.

Hierarchy

  • Error

    TemporalFailure

Constructors

constructor

new TemporalFailure(message, cause?)

Parameters

NameType
messageundefined | string
cause?Error

Overrides

Error.constructor

Properties

cause

Optional Readonly cause: Error


failure

Optional failure: IFailure

The original failure that constructed this error.

Only present if this error was generated from an external operation.


message

message: string

Inherited from

Error.message


name

Readonly name: string

Overrides

Error.name


stack

Optional stack: string

Inherited from

Error.stack


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

Inherited from

Error.prepareStackTrace


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Methods

captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace