summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs
index e7e5af2..14b2842 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,14 +1,11 @@
-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),
+ Limit(#[from] tokio::sync::TryAcquireError),
#[error("hyper error")]
Hyper(hyper::Error),
#[error("no host")]
@@ -37,6 +34,10 @@ pub enum ServiceError {
UpgradeFailed,
#[error("{0}")]
Custom(String),
+ #[error("parse int error: {0}")]
+ ParseIntError(#[from] std::num::ParseIntError),
+ #[error("invalid header")]
+ InvalidHeader,
#[error("impossible error")]
Other,
}