Skip to main content

zeph_core/orchestration/
error.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4use crate::subagent::error::SubAgentError;
5
6#[derive(Debug, thiserror::Error)]
7pub enum OrchestrationError {
8    #[error("orchestration is disabled")]
9    Disabled,
10
11    #[error("planning failed: {0}")]
12    PlanningFailed(String),
13
14    #[error("invalid graph: {0}")]
15    InvalidGraph(String),
16
17    #[error("cycle detected in task graph")]
18    CycleDetected,
19
20    #[error("task not found: {0}")]
21    TaskNotFound(String),
22
23    #[error("no agent available for task: {0}")]
24    NoAgentAvailable(String),
25
26    #[error("graph not found: {0}")]
27    GraphNotFound(String),
28
29    #[error("scheduler error: {0}")]
30    Scheduler(String),
31
32    #[error("aggregation failed: {0}")]
33    AggregationFailed(String),
34
35    #[error("persistence error: {0}")]
36    Persistence(String),
37
38    #[error("task timed out: {0}")]
39    TaskTimeout(String),
40
41    #[error("canceled")]
42    Canceled,
43
44    #[error("invalid command: {0}")]
45    InvalidCommand(String),
46
47    #[error(transparent)]
48    SubAgent(#[from] SubAgentError),
49}