1use thiserror::Error;
3
4#[derive(Error, Debug)]
6pub enum Error {
7 #[error(transparent)]
9 Reqwest(#[from] reqwest::Error),
10 #[error(transparent)]
12 SerdeJsonError(#[from] serde_json::Error),
13 #[error("We have hit the API limit, try again later")]
15 Limit,
16 #[error("The token does not exist or is deactivated")]
18 Token,
19 #[error("The request was malformed")]
21 Malformed,
22 #[error("The requesting too many items")]
24 TooLarge,
25 #[error("Invalid date format")]
27 InvalidDateFormat,
28 #[error("Invalid response: {0}")]
30 InvalidResponse(String),
31 #[error("Missing body")]
33 MissingBody,
34 #[error("Historical data access requires strong authorization (data older than 90 days)")]
36 HistoricalDataLocked,
37}