aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-11-14 11:54:01 +0100
committermetamuffin <metamuffin@disroot.org>2023-11-14 11:54:01 +0100
commit3b1afad1d1a697e82c003e146ef2b7d5742e5210 (patch)
tree3a9e02470b4f78c4c34c0573c788da301a9e544e /src/error.rs
parent4a7bd84594fb8d159a0a2af02818f283eab3e716 (diff)
downloadgnix-3b1afad1d1a697e82c003e146ef2b7d5742e5210.tar
gnix-3b1afad1d1a697e82c003e146ef2b7d5742e5210.tar.bz2
gnix-3b1afad1d1a697e82c003e146ef2b7d5742e5210.tar.zst
refactor architecture and start on http basic auth
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index 83a1ffa..b78999f 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -2,6 +2,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),
#[error("hyper error")]
@@ -18,8 +23,14 @@ pub enum ServiceError {
BadRange,
#[error("bad utf8")]
BadUtf8(#[from] std::str::Utf8Error),
+ #[error("bad utf8")]
+ BadUtf82(#[from] std::string::FromUtf8Error),
#[error("bad path")]
BadPath,
- #[error("ohh. i didn't expect that this error can be generated.")]
+ #[error("bad auth")]
+ BadAuth,
+ #[error("bad base64: {0}")]
+ BadBase64(#[from] base64::DecodeError),
+ #[error("impossible error")]
Other,
}