Skip to main content

runkon_flow/
engine_error.rs

1use crate::cancellation_reason::CancellationReason;
2use thiserror::Error;
3
4pub type Result<T, E = EngineError> = std::result::Result<T, E>;
5
6#[allow(dead_code)]
7#[derive(Debug, Error)]
8pub enum EngineError {
9    #[error("workflow cancelled: {0:?}")]
10    Cancelled(CancellationReason),
11    #[error("persistence error: {0}")]
12    Persistence(String),
13    #[error("workflow error: {0}")]
14    Workflow(String),
15    #[error("workflow not found: {0}")]
16    WorkflowNotFound(String),
17    #[error("workflow run already owned by another engine: {0}")]
18    AlreadyOwned(String),
19}