diff --git a/meilisearch-http/src/error.rs b/meilisearch-http/src/error.rs index afefdec3a..6d6310cd0 100644 --- a/meilisearch-http/src/error.rs +++ b/meilisearch-http/src/error.rs @@ -79,7 +79,7 @@ impl IntoResponse for ResponseError { error(err, StatusCode::BAD_REQUEST) } ResponseError::InvalidToken(err) => { - error(format!("Invalid Token: {}", err), StatusCode::FORBIDDEN) + error(format!("Invalid API key: {}", err), StatusCode::FORBIDDEN) } ResponseError::NotFound(err) => error(err, StatusCode::NOT_FOUND), ResponseError::IndexNotFound(index) => { diff --git a/meilisearch-http/src/helpers/tide.rs b/meilisearch-http/src/helpers/tide.rs index 3edbc81e6..52c785fee 100644 --- a/meilisearch-http/src/helpers/tide.rs +++ b/meilisearch-http/src/helpers/tide.rs @@ -66,7 +66,7 @@ impl ContextExt for Context { } if !token_config.acl.contains(&acl) { - return Err(ResponseError::invalid_token("token do not have this ACL")); + return Err(ResponseError::invalid_token("no permission")); } Ok(())