summaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: ef30b977cd1772409de095ca70c955a070d8f764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub type Result<T, E = Error> = std::result::Result<T, E>;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("IO error: {0}")]
    IO(#[from] std::io::Error),

    #[error("Config error: {0}")]
    Toml(#[from] toml::de::Error),

    #[error("Request error: {0}")]
    Reqwest(#[from] reqwest::Error),

    #[error("Invalid HTTP method")]
    Method,
}