Class Failure
- Namespace
- Temporalio.Api.Failure.V1
- Assembly
- Temporalio.dll
public sealed class Failure : IMessage<Failure>, IEquatable<Failure>, IDeepCloneable<Failure>, IBufferMessage, IMessage
- Inheritance
-
Failure
- 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
ApplicationFailureInfoFieldNumber
Field number for the "application_failure_info" field.
public const int ApplicationFailureInfoFieldNumber = 5
Field Value
CanceledFailureInfoFieldNumber
Field number for the "canceled_failure_info" field.
public const int CanceledFailureInfoFieldNumber = 7
Field Value
CauseFieldNumber
Field number for the "cause" field.
public const int CauseFieldNumber = 4
Field Value
ChildWorkflowExecutionFailureInfoFieldNumber
Field number for the "child_workflow_execution_failure_info" field.
public const int ChildWorkflowExecutionFailureInfoFieldNumber = 12
Field Value
EncodedAttributesFieldNumber
Field number for the "encoded_attributes" field.
public const int EncodedAttributesFieldNumber = 20
Field Value
MessageFieldNumber
Field number for the "message" field.
public const int MessageFieldNumber = 1
Field Value
NexusOperationExecutionFailureInfoFieldNumber
Field number for the "nexus_operation_execution_failure_info" field.
public const int NexusOperationExecutionFailureInfoFieldNumber = 13
Field Value
ResetWorkflowFailureInfoFieldNumber
Field number for the "reset_workflow_failure_info" field.
public const int ResetWorkflowFailureInfoFieldNumber = 10
Field Value
ServerFailureInfoFieldNumber
Field number for the "server_failure_info" field.
public const int ServerFailureInfoFieldNumber = 9
Field Value
SourceFieldNumber
Field number for the "source" field.
public const int SourceFieldNumber = 2
Field Value
StackTraceFieldNumber
Field number for the "stack_trace" field.
public const int StackTraceFieldNumber = 3
Field Value
TerminatedFailureInfoFieldNumber
Field number for the "terminated_failure_info" field.
public const int TerminatedFailureInfoFieldNumber = 8
Field Value
TimeoutFailureInfoFieldNumber
Field number for the "timeout_failure_info" field.
public const int TimeoutFailureInfoFieldNumber = 6
Field Value
Properties
ActivityFailureInfo
public ActivityFailureInfo ActivityFailureInfo { get; set; }
Property Value
ApplicationFailureInfo
public ApplicationFailureInfo ApplicationFailureInfo { get; set; }
Property Value
CanceledFailureInfo
public CanceledFailureInfo CanceledFailureInfo { get; set; }
Property Value
Cause
public Failure Cause { get; set; }
Property Value
ChildWorkflowExecutionFailureInfo
public ChildWorkflowExecutionFailureInfo ChildWorkflowExecutionFailureInfo { get; set; }
Property Value
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
anddecodeFailureAttributes
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
- Uses a JSON object to represent
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
FailureInfoCase
public Failure.FailureInfoOneofCase FailureInfoCase { get; }
Property Value
Message
public string Message { get; set; }
Property Value
NexusOperationExecutionFailureInfo
public NexusOperationFailureInfo NexusOperationExecutionFailureInfo { get; set; }
Property Value
Parser
public static MessageParser<Failure> Parser { get; }
Property Value
- MessageParser<Failure>
ResetWorkflowFailureInfo
public ResetWorkflowFailureInfo ResetWorkflowFailureInfo { get; set; }
Property Value
ServerFailureInfo
public ServerFailureInfo ServerFailureInfo { get; set; }
Property Value
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
StackTrace
public string StackTrace { get; set; }
Property Value
TerminatedFailureInfo
public TerminatedFailureInfo TerminatedFailureInfo { get; set; }
Property Value
TimeoutFailureInfo
public TimeoutFailureInfo TimeoutFailureInfo { get; set; }
Property Value
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
Equals(Failure)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Failure other)
Parameters
other
FailureAn object to compare with this object.
Returns
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
CodedOutputStreamCoded output stream to write the data to. Must not be null.