1#[derive(Debug, thiserror::Error)]
4pub enum WorkflowError {
5 #[error("stage '{0}' failed: {1}")]
6 StageFailed(String, String),
7
8 #[error("edge condition unsatisfied: {0} -> {1}")]
9 EdgeConditionFailed(String, String),
10
11 #[error("compensation failed at stage '{0}': {1}")]
12 CompensationFailed(String, String),
13
14 #[error("workflow verification failed: {0}")]
15 VerificationFailed(String),
16
17 #[error("stage not found: '{0}'")]
18 StageNotFound(String),
19
20 #[error("no start stage defined")]
21 NoStartStage,
22
23 #[error("agent error: {0}")]
24 Agent(#[from] car_multi::MultiError),
25
26 #[error("cycle limit reached after {0} iterations")]
27 CycleLimitReached(u32),
28
29 #[error("stage '{0}' timed out after {1}ms")]
30 Timeout(String, u64),
31}