1use thiserror::Error;
2
3pub type MarketResult<T> = std::result::Result<T, MarketError>;
4
5#[derive(Debug, Error)]
7pub enum MarketError {
8 #[error("Error parsing the Url: {0}")]
9 UrlParseError(#[from] url::ParseError),
10
11 #[error("Unable to retrieve data: {0}")]
12 RetriveDataError(#[from] reqwest::Error),
13
14 #[error("Unable to deserialize: {0}")]
15 UnableToDeserialize(#[from] serde_json::error::Error),
16
17 #[error("Http error: {0}")]
18 HttpError(String),
19
20 #[error("Problem with downloaded data: {0}")]
21 DownloadedData(String),
22
23 #[error("Parsing error: {0}")]
24 ParsingError(String),
25
26 #[error("Unable to write to: {0}")]
27 ToWriter(String),
28
29 #[error("Unsuported Interval for selected publisher: {0}")]
30 UnsuportedInterval(String),
31}