worldinterface_host/
error.rs1use worldinterface_contextstore::error::ContextStoreError;
4use worldinterface_core::id::FlowRunId;
5use worldinterface_flowspec::error::CompilationError;
6
7#[derive(Debug, thiserror::Error)]
9pub enum HostError {
10 #[error("invalid configuration: {0}")]
12 InvalidConfig(String),
13
14 #[error("flow compilation failed: {0}")]
16 Compilation(#[from] CompilationError),
17
18 #[error("engine bootstrap failed: {0}")]
20 Bootstrap(#[from] actionqueue_runtime::engine::BootstrapError),
21
22 #[error("engine error: {0}")]
24 Engine(#[from] actionqueue_runtime::engine::EngineError),
25
26 #[error("context store error: {0}")]
28 ContextStore(#[from] ContextStoreError),
29
30 #[error("flow run not found: {0}")]
32 FlowRunNotFound(FlowRunId),
33
34 #[error("connector not found: {0}")]
36 ConnectorNotFound(String),
37
38 #[error("flow {flow_run_id} failed: {error}")]
40 FlowFailed { flow_run_id: FlowRunId, error: String },
41
42 #[error("flow {0} was canceled")]
44 FlowCanceled(FlowRunId),
45
46 #[error("I/O error: {0}")]
48 Io(#[from] std::io::Error),
49
50 #[error("serialization error: {0}")]
52 Serde(#[from] serde_json::Error),
53
54 #[error("UUID parse error: {0}")]
56 UuidParse(#[from] uuid::Error),
57
58 #[error("internal error: {0}")]
60 InternalError(String),
61}