#[repr(i32)]pub enum TaskErrorCode {
Unspecified = 0,
Timeout = 1,
InvalidInput = 2,
ComponentFailed = 3,
Cancelled = 4,
Unreachable = 5,
ComponentNotFound = 6,
ResourceUnavailable = 7,
ExpressionFailure = 8,
OrchestratorError = 9,
WorkerError = 10,
}Expand description
Error codes for task and step failures.
Each variant encodes retryability semantics:
- Always retried (transport): UNREACHABLE, TIMEOUT
- Retried with onError policy: COMPONENT_FAILED, RESOURCE_UNAVAILABLE
- Never retried: all others
Variants§
Unspecified = 0
Default value; should not be used explicitly.
Timeout = 1
The task exceeded its execution deadline or heartbeat timeout. Always retried (transport-level).
InvalidInput = 2
The component rejected its input (e.g., missing required fields, schema validation failure). Not retriable without correcting the input.
ComponentFailed = 3
The component executed but returned a business-logic failure (e.g., an API call returned an error, a transformation produced an invalid result). Retriable with onError: retry policy.
Cancelled = 4
The task was explicitly cancelled by the orchestrator (e.g., run cancellation, step timeout policy). Not retriable.
Unreachable = 5
The worker or component could not be reached (e.g., worker disconnected, subprocess crash, network timeout). The component never executed. Always retried (transport-level).
ComponentNotFound = 6
The requested component does not exist on the worker (e.g., unknown component name, misconfigured route). Not retriable without fixing the workflow or routing configuration.
A resource required by the component was not available during execution (e.g., external API down, database connection failed). Retriable with onError: retry policy.
ExpressionFailure = 8
The orchestrator failed to resolve a value expression (e.g., $step reference to unknown step, path to nonexistent field). Not retriable — the flow definition must be corrected.
OrchestratorError = 9
Catch-all for unexpected orchestrator errors (e.g., internal state corruption, serialization failure). Not retriable.
WorkerError = 10
Catch-all for unexpected worker/SDK errors (e.g., serialization failure, panic, protocol violation). Not retriable.
Implementations§
Source§impl TaskErrorCode
impl TaskErrorCode
Source§impl TaskErrorCode
impl TaskErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for TaskErrorCode
impl Clone for TaskErrorCode
Source§fn clone(&self) -> TaskErrorCode
fn clone(&self) -> TaskErrorCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskErrorCode
impl Debug for TaskErrorCode
Source§impl Default for TaskErrorCode
impl Default for TaskErrorCode
Source§fn default() -> TaskErrorCode
fn default() -> TaskErrorCode
Source§impl<'de> Deserialize<'de> for TaskErrorCode
impl<'de> Deserialize<'de> for TaskErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<TaskErrorCode> for i32
impl From<TaskErrorCode> for i32
Source§fn from(value: TaskErrorCode) -> i32
fn from(value: TaskErrorCode) -> i32
Source§impl Hash for TaskErrorCode
impl Hash for TaskErrorCode
Source§impl JsonSchema for TaskErrorCode
impl JsonSchema for TaskErrorCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for TaskErrorCode
impl Ord for TaskErrorCode
Source§fn cmp(&self, other: &TaskErrorCode) -> Ordering
fn cmp(&self, other: &TaskErrorCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TaskErrorCode
impl PartialEq for TaskErrorCode
Source§impl PartialOrd for TaskErrorCode
impl PartialOrd for TaskErrorCode
Source§impl Serialize for TaskErrorCode
impl Serialize for TaskErrorCode
Source§impl TryFrom<i32> for TaskErrorCode
impl TryFrom<i32> for TaskErrorCode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<TaskErrorCode, UnknownEnumValue>
fn try_from(value: i32) -> Result<TaskErrorCode, UnknownEnumValue>
impl Copy for TaskErrorCode
impl Eq for TaskErrorCode
impl StructuralPartialEq for TaskErrorCode
Auto Trait Implementations§
impl Freeze for TaskErrorCode
impl RefUnwindSafe for TaskErrorCode
impl Send for TaskErrorCode
impl Sync for TaskErrorCode
impl Unpin for TaskErrorCode
impl UnsafeUnpin for TaskErrorCode
impl UnwindSafe for TaskErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request