Skip to main content

Interface: IFailure

failure.v1.IFailure

Properties of a Failure.

Implemented by

Properties

activityFailureInfo

Optional activityFailureInfo: null | IActivityFailureInfo

Failure activityFailureInfo


applicationFailureInfo

Optional applicationFailureInfo: null | IApplicationFailureInfo

Failure applicationFailureInfo


canceledFailureInfo

Optional canceledFailureInfo: null | ICanceledFailureInfo

Failure canceledFailureInfo


cause

Optional cause: null | IFailure

Failure cause


childWorkflowExecutionFailureInfo

Optional childWorkflowExecutionFailureInfo: null | IChildWorkflowExecutionFailureInfo

Failure childWorkflowExecutionFailureInfo


encodedAttributes

Optional encodedAttributes: null | IPayload

Alternative way to supply message and stack_trace and possibly other attributes, used for encryption of errors originating in user code which might contain sensitive information. The encoded_attributes Payload could represent any serializable object, e.g. JSON object or a Failure proto message.

SDK authors:

  • The SDK should provide a default encodeFailureAttributes and decodeFailureAttributes implementation that:

  • Uses a JSON object to represent { message, stack_trace }.

  • Overwrites the original message with "Encoded failure" to indicate that more information could be extracted.

  • Overwrites the original stack_trace with an empty string.

  • The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed by the user-provided PayloadCodec

  • If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. (-- api-linter: core::0203::optional=disabled --)


message

Optional message: null | string

Failure message


nexusOperationExecutionFailureInfo

Optional nexusOperationExecutionFailureInfo: null | INexusOperationFailureInfo

Failure nexusOperationExecutionFailureInfo


resetWorkflowFailureInfo

Optional resetWorkflowFailureInfo: null | IResetWorkflowFailureInfo

Failure resetWorkflowFailureInfo


serverFailureInfo

Optional serverFailureInfo: null | IServerFailureInfo

Failure serverFailureInfo


source

Optional source: null | string

The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK In some SDKs this is used to rehydrate the stack trace into an exception object.


stackTrace

Optional stackTrace: null | string

Failure stackTrace


terminatedFailureInfo

Optional terminatedFailureInfo: null | ITerminatedFailureInfo

Failure terminatedFailureInfo


timeoutFailureInfo

Optional timeoutFailureInfo: null | ITimeoutFailureInfo

Failure timeoutFailureInfo