1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use thiserror::Error;
use crate::http_api_v3::data::error::Error as ResponseError;
#[derive(Debug, Error)]
pub enum Error {
#[error("URL {} parsing: {0}")]
UrlParsing(reqwest::UrlError, String),
#[error("request building: {0}")]
RequestBuilding(reqwest::Error),
#[error("authorization keys missing. Please, add create a client with keys")]
AuthorizationKeysMissing,
#[error("request execution: {0}")]
RequestExecution(reqwest::Error),
#[error("response reading: {0}")]
ResponseReading(reqwest::Error),
#[error("response parsing: {0} ({1})")]
ResponseParsing(serde_json::Error, String),
#[error("response error: {0:?}")]
ResponseError(ResponseError),
#[error("WebSocket: {0}")]
WebSocket(websocket::WebSocketError),
}