ErrorDetails

Enum ErrorDetails 

Source
pub enum ErrorDetails {
    Infrastructure {
        operation: String,
        message: String,
        retryable: bool,
    },
    Configuration {
        kind: ConfigErrorKind,
        resource: String,
        message: Option<String>,
    },
    Application {
        kind: AppErrorKind,
        message: String,
        retryable: bool,
    },
    Poison {
        attempt_count: u32,
        max_attempts: u32,
        message_type: PoisonMessageType,
        message: String,
    },
}
Expand description

Structured error details for orchestration failures.

Errors are categorized into three types for proper metrics and logging:

  • Infrastructure: Provider failures, data corruption (abort turn, never reach user code)
  • Configuration: Deployment issues like unregistered activities, nondeterminism (abort turn)
  • Application: Business logic failures (flow through normal orchestration code)

Variants§

§

Infrastructure

Infrastructure failure (provider errors, data corruption). These errors abort orchestration execution and never reach user code.

Fields

§operation: String
§message: String
§retryable: bool
§

Configuration

Configuration error (unregistered orchestrations/activities, nondeterminism). These errors abort orchestration execution and never reach user code.

Fields

§resource: String
§message: Option<String>
§

Application

Application error (business logic failures). These are the ONLY errors that orchestration code sees.

Fields

§message: String
§retryable: bool
§

Poison

Poison message error - message exceeded max fetch attempts.

This indicates a message that repeatedly fails to process. Could be caused by:

  • Malformed message data causing deserialization failures
  • Message triggering bugs that crash the worker
  • Transient infrastructure issues that became permanent
  • Application code bugs triggered by specific input patterns

Fields

§attempt_count: u32

Number of times the message was fetched

§max_attempts: u32

Maximum allowed attempts

§message_type: PoisonMessageType

Message type and identity

§message: String

The poisoned message content (serialized JSON for debugging)

Implementations§

Source§

impl ErrorDetails

Source

pub fn category(&self) -> &'static str

Get failure category for metrics/logging.

Source

pub fn is_retryable(&self) -> bool

Check if failure is retryable.

Source

pub fn display_message(&self) -> String

Get display message for logging/UI (backward compatible format).

Trait Implementations§

Source§

impl Clone for ErrorDetails

Source§

fn clone(&self) -> ErrorDetails

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorDetails

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ErrorDetails

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ErrorDetails

Source§

fn eq(&self, other: &ErrorDetails) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ErrorDetails

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ErrorDetails

Source§

impl StructuralPartialEq for ErrorDetails

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,