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()),