blob: 83a1ffa76bea9de445874084f81e8d540419f85c (
plain)
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
|
use tokio::sync::TryAcquireError;
#[derive(Debug, thiserror::Error)]
pub enum ServiceError {
#[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 path")]
BadPath,
#[error("ohh. i didn't expect that this error can be generated.")]
Other,
}
|