diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-17 20:46:23 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-17 20:46:23 +0100 |
commit | 143fe969eb6225c2aa8694930114103f1d4f0c9c (patch) | |
tree | 7f430400b464413fc16bd0bb91aad0436685482b /src/error.rs | |
parent | a76cab9f30a51b9b4d2377b2d25640c129bf3ab3 (diff) | |
download | gnix-143fe969eb6225c2aa8694930114103f1d4f0c9c.tar gnix-143fe969eb6225c2aa8694930114103f1d4f0c9c.tar.bz2 gnix-143fe969eb6225c2aa8694930114103f1d4f0c9c.tar.zst |
h3 ground work
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index a518bfb..3950b80 100644 --- a/src/error.rs +++ b/src/error.rs @@ -8,6 +8,8 @@ pub enum ServiceError { Limit(#[from] tokio::sync::TryAcquireError), #[error("hyper error")] Hyper(hyper::Error), + #[error("h3 error: {0}")] + H3(h3::Error), #[error("host header missing")] NoHost, #[error("unknown host")] @@ -58,6 +60,7 @@ impl ServiceError { ServiceError::RequestTaken => StatusCode::INTERNAL_SERVER_ERROR, ServiceError::Limit(_) => StatusCode::TOO_MANY_REQUESTS, ServiceError::Hyper(_) => StatusCode::INTERNAL_SERVER_ERROR, + ServiceError::H3(_) => StatusCode::INTERNAL_SERVER_ERROR, ServiceError::NoHost => StatusCode::BAD_REQUEST, ServiceError::UnknownHost => StatusCode::NOT_FOUND, ServiceError::UnknownPath => StatusCode::NOT_FOUND, |