1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use crate::controller::Error as ControllerError;
use jormungandr_automation::{
    jormungandr::{ExplorerError, RestError},
    testing::ConsumptionBenchmarkError,
};
use jortestkit::prelude::InteractiveCommandError;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error(transparent)]
    MonitorNode(#[from] crate::controller::NodeError),
    #[error(transparent)]
    InteractiveCommand(#[from] InteractiveCommandError),
    #[error(transparent)]
    Controller(#[from] ControllerError),
    #[error(transparent)]
    Verification(#[from] jormungandr_automation::testing::VerificationError),
    #[error(transparent)]
    FragmentVerifier(#[from] thor::FragmentVerifierError),
    #[error(transparent)]
    ConsumptionBenchmark(#[from] ConsumptionBenchmarkError),
    #[error(transparent)]
    Explorer(#[from] ExplorerError),
    #[error(transparent)]
    FragmentSender(#[from] thor::FragmentSenderError),
    #[error("Rest error: {0}")]
    Rest(#[from] RestError),
    #[error("IO error: {0}")]
    IO(#[from] std::io::Error),
    #[error("Serialization error: {0}")]
    Serialization(#[from] serde_yaml::Error),
    #[error("Circular dependency in network topology")]
    CircularTrust,
    #[error("INTERNAL ERROR: {0}")]
    Internal(String),
}