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 tokio::sync::TryAcquireError;
#[derive(Debug, thiserror::Error)]
pub enum ServiceError {
#[error("no response generated; the proxy is misconfigured")]
NoResponse,
#[error("request taken; the proxy is misconfigured")]
RequestTaken,
#[error("limit reached. try again")]
Limit(#[from] TryAcquireError),
#[error("hyper error")]
Hyper(hyper::Error),
#[error("unknown host")]
NoHost,
#[error("can't connect to the backend")]
CantConnect,
#[error("not found")]
NotFound,
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("bad range")]
BadRange,
#[error("bad utf8")]
BadUtf8(#[from] std::str::Utf8Error),
#[error("bad utf8")]
BadUtf82(#[from] std::string::FromUtf8Error),
#[error("bad path")]
BadPath,
#[error("bad auth")]
BadAuth,
#[error("bad base64: {0}")]
BadBase64(#[from] base64::DecodeError),
#[error("connection upgrade failed")]
UpgradeFailed,
#[error("impossible error")]
Other,
}
|