From 0fe30ef2883f45d03e29f4ca14724302aa42c8f9 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Thu, 9 Nov 2023 22:23:02 +0100 Subject: [PATCH] feat: instead of Outcome:Failure us Outcome:Error --- src/implementations/access_token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/implementations/access_token.rs b/src/implementations/access_token.rs index 0fe0bb3..ea156fd 100644 --- a/src/implementations/access_token.rs +++ b/src/implementations/access_token.rs @@ -16,7 +16,7 @@ impl<'r> FromRequest<'r> for Token { if auth_token == ACCESS_TOKEN.to_string() { Outcome::Success(Token(auth_token.to_string())) } else { - Outcome::Failure(( + Outcome::Error(( Status::Unauthorized, AuthError { error: "Invalid Authorization token".to_string(), @@ -24,7 +24,7 @@ impl<'r> FromRequest<'r> for Token { )) } } else { - Outcome::Failure(( + Outcome::Error(( Status::Unauthorized, AuthError { error: "Missing Authorization header".to_string(),