From ef8172874f650078e8cfb6e1582de4ece5495640 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 12 Aug 2024 20:49:47 +0200 Subject: add any/all conditions and experimental CGI support --- src/error.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/error.rs') 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, } -- cgit v1.2.3-70-g09d2