From 3b917645879ae7db11b76f6603d401c15cf14add Mon Sep 17 00:00:00 2001 From: mpostma Date: Mon, 4 Oct 2021 19:39:54 +0200 Subject: [PATCH] fix auth error --- meilisearch-http/src/extractors/authentication/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meilisearch-http/src/extractors/authentication/mod.rs b/meilisearch-http/src/extractors/authentication/mod.rs index 4d7b21ae1..d90eb4277 100644 --- a/meilisearch-http/src/extractors/authentication/mod.rs +++ b/meilisearch-http/src/extractors/authentication/mod.rs @@ -168,7 +168,8 @@ impl FromRequest for GuardedData None => err(AuthenticationError::IrretrievableState.into()), } } else { - err(AuthenticationError::InvalidToken(String::from("hello")).into()) + let token = token.to_str().unwrap_or("unknown").to_string(); + err(AuthenticationError::InvalidToken(token).into()) } } None => err(AuthenticationError::MissingAuthorizationHeader.into()),