szal 1.0.0

Workflow engine — step/flow execution with branching, retry, rollback, and parallel stages
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
#[non_exhaustive]
pub enum SzalError {
    #[error("step failed: {step} — {reason}")]
    StepFailed { step: String, reason: String },
    #[error("step timeout: {step} after {timeout_ms}ms")]
    StepTimeout { step: String, timeout_ms: u64 },
    #[error("flow invalid: {0}")]
    InvalidFlow(String),
    #[error("retry exhausted: {step} after {attempts} attempts")]
    RetryExhausted { step: String, attempts: u32 },
    #[error("rollback failed: {step} — {reason}")]
    RollbackFailed { step: String, reason: String },
    #[error("cycle detected in DAG: {0}")]
    CycleDetected(String),
    #[cfg(feature = "hardware")]
    #[error(
        "hardware unavailable: step '{step}' requires {requirement} but no matching device found"
    )]
    HardwareUnavailable { step: String, requirement: String },
    #[cfg(feature = "majra")]
    #[error("queue operation failed: {0}")]
    QueueError(String),
    #[error(transparent)]
    Other(#[from] anyhow::Error),
}