use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error(transparent)]
Reqwest(#[from] reqwest::Error),
#[error(transparent)]
SerdeJson(#[from] serde_json::Error),
#[error("We have hit the API limit, try again later")]
Limit,
#[error("The token does not exist or is deactivated")]
Token,
#[error("Scope( metadata ) missing for API key")]
Scope,
#[error("The request was malformed")]
Malformed,
#[error("The request has timed out")]
Timeout,
#[error("Internal Server Error: {0}")]
InternalServerError(String),
#[error("The requesting too many items")]
TooLarge,
#[error("Invalid date format")]
InvalidDateFormat,
#[error("Invalid response: {0}")]
InvalidResponse(String),
#[error("Missing body")]
MissingBody,
#[error("Invalid client")]
NoClient,
}