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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
use crate::controller::InteractiveCommandError;
use jormungandr_automation::jormungandr::{ExplorerError, StartupError};
use thiserror::Error;
use thor::FragmentSenderError;

#[derive(Debug, Error)]
pub enum Error {
    #[error(transparent)]
    Node(#[from] super::monitor::NodeError),

    #[error(transparent)]
    Wallet(#[from] thor::WalletError),

    #[error(transparent)]
    FsFixture(#[from] assert_fs::fixture::FixtureError),

    #[error(transparent)]
    Io(#[from] std::io::Error),

    #[error(transparent)]
    Reqwest(#[from] reqwest::Error),

    #[error(transparent)]
    Explorer(#[from] ExplorerError),

    #[error(transparent)]
    BlockFormatError(#[from] chain_core::property::ReadError),

    #[error(transparent)]
    BlockWriteError(#[from] chain_core::property::WriteError),

    #[error("No node with alias {0}")]
    NodeNotFound(String),

    #[error("Wallet '{0}' was not found. Used before or never initialize")]
    WalletNotFound(String),

    #[error("StakePool '{0}' was not found. Used before or never initialize")]
    StakePoolNotFound(String),

    #[error("VotePlan '{0}' was not found. Used before or never initialize")]
    VotePlanNotFound(String),

    #[error(transparent)]
    Startup(#[from] StartupError),

    #[error("cannot spawn the node")]
    CannotSpawnNode(#[source] std::io::Error),

    #[error(transparent)]
    InteractiveCommand(#[from] InteractiveCommandError),

    #[error(transparent)]
    FragmentSender(#[from] FragmentSenderError),

    #[error(transparent)]
    Serialization(#[from] serde_yaml::Error),
    #[error(transparent)]
    Legacy(#[from] jormungandr_automation::jormungandr::LegacyConfigError),
    #[error(transparent)]
    SettingsWallet(#[from] crate::builder::settings::wallet::Error),
    #[error(transparent)]
    Settings(#[from] crate::builder::settings::Error),
    #[error("no explorer configuration defined")]
    NoExplorerConfigurationDefined,
}