Table of Contents

Class Failure

Namespace
Temporalio.Api.Failure.V1
Assembly
Temporalio.dll
public sealed class Failure : IMessage<Failure>, IEquatable<Failure>, IDeepCloneable<Failure>, IBufferMessage, IMessage
Inheritance
Failure
Implements
IMessage<Failure>
IDeepCloneable<Failure>
IBufferMessage
IMessage
Inherited Members

Constructors

Failure()

public Failure()

Failure(Failure)

public Failure(Failure other)

Parameters

other Failure

Fields

ActivityFailureInfoFieldNumber

Field number for the "activity_failure_info" field.

public const int ActivityFailureInfoFieldNumber = 11

Field Value

int

ApplicationFailureInfoFieldNumber

Field number for the "application_failure_info" field.

public const int ApplicationFailureInfoFieldNumber = 5

Field Value

int

CanceledFailureInfoFieldNumber

Field number for the "canceled_failure_info" field.

public const int CanceledFailureInfoFieldNumber = 7

Field Value

int

CauseFieldNumber

Field number for the "cause" field.

public const int CauseFieldNumber = 4

Field Value

int

ChildWorkflowExecutionFailureInfoFieldNumber

Field number for the "child_workflow_execution_failure_info" field.

public const int ChildWorkflowExecutionFailureInfoFieldNumber = 12

Field Value

int

EncodedAttributesFieldNumber

Field number for the "encoded_attributes" field.

public const int EncodedAttributesFieldNumber = 20

Field Value

int

MessageFieldNumber

Field number for the "message" field.

public const int MessageFieldNumber = 1

Field Value

int

NexusOperationExecutionFailureInfoFieldNumber

Field number for the "nexus_operation_execution_failure_info" field.

public const int NexusOperationExecutionFailureInfoFieldNumber = 13

Field Value

int

ResetWorkflowFailureInfoFieldNumber

Field number for the "reset_workflow_failure_info" field.

public const int ResetWorkflowFailureInfoFieldNumber = 10

Field Value

int

ServerFailureInfoFieldNumber

Field number for the "server_failure_info" field.

public const int ServerFailureInfoFieldNumber = 9

Field Value

int

SourceFieldNumber

Field number for the "source" field.

public const int SourceFieldNumber = 2

Field Value

int

StackTraceFieldNumber

Field number for the "stack_trace" field.

public const int StackTraceFieldNumber = 3

Field Value

int

TerminatedFailureInfoFieldNumber

Field number for the "terminated_failure_info" field.

public const int TerminatedFailureInfoFieldNumber = 8

Field Value

int

TimeoutFailureInfoFieldNumber

Field number for the "timeout_failure_info" field.

public const int TimeoutFailureInfoFieldNumber = 6

Field Value

int

Properties

ActivityFailureInfo

public ActivityFailureInfo ActivityFailureInfo { get; set; }

Property Value

ActivityFailureInfo

ApplicationFailureInfo

public ApplicationFailureInfo ApplicationFailureInfo { get; set; }

Property Value

ApplicationFailureInfo

CanceledFailureInfo

public CanceledFailureInfo CanceledFailureInfo { get; set; }

Property Value

CanceledFailureInfo

Cause

public Failure Cause { get; set; }

Property Value

Failure

ChildWorkflowExecutionFailureInfo

public ChildWorkflowExecutionFailureInfo ChildWorkflowExecutionFailureInfo { get; set; }

Property Value

ChildWorkflowExecutionFailureInfo

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

EncodedAttributes

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 --)

public Payload EncodedAttributes { get; set; }

Property Value

Payload

FailureInfoCase

public Failure.FailureInfoOneofCase FailureInfoCase { get; }

Property Value

Failure.FailureInfoOneofCase

Message

public string Message { get; set; }

Property Value

string

NexusOperationExecutionFailureInfo

public NexusOperationFailureInfo NexusOperationExecutionFailureInfo { get; set; }

Property Value

NexusOperationFailureInfo

Parser

public static MessageParser<Failure> Parser { get; }

Property Value

MessageParser<Failure>

ResetWorkflowFailureInfo

public ResetWorkflowFailureInfo ResetWorkflowFailureInfo { get; set; }

Property Value

ResetWorkflowFailureInfo

ServerFailureInfo

public ServerFailureInfo ServerFailureInfo { get; set; }

Property Value

ServerFailureInfo

Source

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.

public string Source { get; set; }

Property Value

string

StackTrace

public string StackTrace { get; set; }

Property Value

string

TerminatedFailureInfo

public TerminatedFailureInfo TerminatedFailureInfo { get; set; }

Property Value

TerminatedFailureInfo

TimeoutFailureInfo

public TimeoutFailureInfo TimeoutFailureInfo { get; set; }

Property Value

TimeoutFailureInfo

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

ClearFailureInfo()

public void ClearFailureInfo()

Clone()

Creates a deep clone of this object.

public Failure Clone()

Returns

Failure

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Failure)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Failure other)

Parameters

other Failure

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(Failure)

Merges the given message into this one.

public void MergeFrom(Failure other)

Parameters

other Failure

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.