summaryrefslogblamecommitdiff
path: root/src/error.rs
blob: 15e430888916cf576acc3f4e895fc62df43b963b (plain) (tree)
1
2
3
4
                                          
 
                                        
 




























                                      
 
use std::{fmt::Debug, num::ParseIntError};

use reqwest::header::InvalidHeaderValue;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("request: {source}")]
    Reqwest {
        #[from]
        source: reqwest::Error,
    },
    #[error("config: {source}")]
    Config {
        #[from]
        source: config::ConfigError,
    },
    #[error("serde: {source}")]
    Serde {
        #[from]
        source: serde_json::Error,
    },
    #[error("parse int: {source}")]
    Parse {
        #[from]
        source: ParseIntError,
    },
    #[error("parse header: {source}")]
    InvalidHeaderValue {
        #[from]
        source: InvalidHeaderValue
    },
    #[error("ws")]
    WsResponse,
}