use reqwest::header::InvalidHeaderValue;
#[allow(missing_docs)]
#[derive(Debug, thiserror::Error)]
pub enum InitError {
#[error("could not parse the server URL")]
InvalidUrl(#[from] url::ParseError),
#[error("invalid access token")]
InvalidAccessToken(#[from] InvalidHeaderValue),
#[error("failed to initialize the HTTP client")]
Reqwest(#[from] reqwest::Error),
}
#[allow(missing_docs)]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("HTTP request failed")]
Reqwest(#[from] reqwest::Error),
#[error("Gotify's API returned an error")]
Response(#[from] crate::models::Error),
}
pub type Result<T> = core::result::Result<T, Error>;