Skip to content

Commit

Permalink
feat: instead of Outcome:Failure us Outcome:Error
Browse files Browse the repository at this point in the history
  • Loading branch information
mgierada committed Nov 9, 2023
1 parent c7be38c commit 0fe30ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/implementations/access_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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(),
},
))
}
} else {
Outcome::Failure((
Outcome::Error((
Status::Unauthorized,
AuthError {
error: "Missing Authorization header".to_string(),
Expand Down

0 comments on commit 0fe30ef

Please sign in to comment.