diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2024-01-30 02:20:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 02:20:19 +0000 |
commit | 4058805557bfd545d88d584a24d9e31447b489bd (patch) | |
tree | e4658595d457ea784ad338966aafb3fbc4a46b1e /src/auth.rs | |
parent | Bump deps (diff) | |
parent | Rename `StartError` -> `StartupError` (diff) | |
download | miniserve-4058805557bfd545d88d584a24d9e31447b489bd.tar.gz miniserve-4058805557bfd545d88d584a24d9e31447b489bd.zip |
Merge pull request #1331 from cyqsimon/error-refactor
Refactor errors
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs index 92157c9..ef16b0c 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -2,7 +2,7 @@ use actix_web::{dev::ServiceRequest, HttpMessage}; use actix_web_httpauth::extractors::basic::BasicAuth; use sha2::{Digest, Sha256, Sha512}; -use crate::errors::ContextualError; +use crate::errors::RuntimeError; #[derive(Clone, Debug)] /// HTTP Basic authentication parameters @@ -86,7 +86,7 @@ pub async fn handle_auth( if match_auth(&cred.into(), required_auth) { Ok(req) } else { - Err((ContextualError::InvalidHttpCredentials.into(), req)) + Err((RuntimeError::InvalidHttpCredentials.into(), req)) } } |