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
#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error("Fetching block failed {0}")]
    FetchBlock(String),

    #[error("Fetching events failed {0}")]
    FetchLog(String),

    #[error("Missing transport node")]
    MissingTransportNode,

    #[error("Fetching block failed {0}")]
    FetchBlockNumberError(String),

    #[error("Failed to parse URL '{0}': {1}")]
    UrlParseError(String, String),

    #[error("Failed to create IPC transport with URL '{0}': {1}")]
    IpcTransportCreationError(String, String),

    #[error("Failed to create WebSocket transport with URL '{0}': {1}")]
    WsTransportCreationError(String, String),

    #[error("Missing transport storage")]
    MissingTransportStorage,

    #[error("{0}")]
    SubscriptionNewBlock(String),

    #[error("{0}")]
    SubscriptionNewLog(String),

    #[error(transparent)]
    JoinTask(#[from] tokio::task::JoinError),

    #[error(transparent)]
    eventifyPrimitives(#[from] eventify_primitives::Error),

    #[error(transparent)]
    Sql(#[from] sqlx::Error),

    #[error(transparent)]
    EthersCore(#[from] ethers_providers::ProviderError),

    #[error(transparent)]
    Migrate(#[from] sqlx::migrate::MigrateError),

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

    #[error(transparent)]
    Url(#[from] url::ParseError),
}