1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::string::FromUtf8Error;

#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error(transparent)]
    IOError(#[from] std::io::Error),
    #[error(transparent)]
    Utf8Error(#[from] FromUtf8Error),

    #[error("Request error {0}")]
    RequestError(String),
    #[error(transparent)]
    TeraError(#[from] tera::Error),
    #[error(transparent)]
    JSONParsingError(#[from] serde_json::Error), // #[error(transparent)]
                                                 // RequestError(#[from] ureq::Error),
}