Skip to content

Commit

Permalink
Improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
legendofa committed Feb 14, 2024
1 parent 7307e63 commit bd32067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Role {
pub fn authenticate_user(ctx: &Context, id: Uuid) -> Result<()> {
match ctx.data::<AuthorizedUserHeader>() {
Ok(authenticate_user_header) => check_permissions(&authenticate_user_header, id),
Err(_) => Err(Error::new("Authorized-User header could not be parsed.")),
Err(_) => Err(Error::new("Authentication failed. Authorized-User header is not set or could not be parsed.")),
}
}

Expand Down

0 comments on commit bd32067

Please sign in to comment.