zombienet_orchestrator/
errors.rs

1//! Zombienet Orchestrator error definitions.
2
3use provider::ProviderError;
4use support::fs::FileSystemError;
5
6use crate::generators;
7
8#[derive(Debug, thiserror::Error)]
9pub enum OrchestratorError {
10    // TODO: improve invalid config reporting
11    #[error("Invalid network configuration: {0}")]
12    InvalidConfig(String),
13    #[error("Invalid network config to use provider {0}: {1}")]
14    InvalidConfigForProvider(String, String),
15    #[error("Invalid configuration for node: {0}, field: {1}")]
16    InvalidNodeConfig(String, String),
17    #[error("Invariant not fulfilled {0}")]
18    InvariantError(&'static str),
19    #[error("Global network spawn timeout: {0} secs")]
20    GlobalTimeOut(u32),
21    #[error("Generator error: {0}")]
22    GeneratorError(#[from] generators::errors::GeneratorError),
23    #[error("Provider error")]
24    ProviderError(#[from] ProviderError),
25    #[error("FileSystem error")]
26    FileSystemError(#[from] FileSystemError),
27    #[error("Serialization error")]
28    SerializationError(#[from] serde_json::Error),
29    #[error(transparent)]
30    SpawnerError(#[from] anyhow::Error),
31}