mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
Rephrase hint message
This commit is contained in:
parent
7ae10abb6b
commit
d4d4702f1b
@ -22,9 +22,9 @@ pub async fn get_metrics(
|
|||||||
let auth_filters = index_scheduler.filters();
|
let auth_filters = index_scheduler.filters();
|
||||||
if !auth_filters.all_indexes_authorized() {
|
if !auth_filters.all_indexes_authorized() {
|
||||||
let mut error = ResponseError::from(AuthenticationError::InvalidToken);
|
let mut error = ResponseError::from(AuthenticationError::InvalidToken);
|
||||||
error.message.push_str(
|
error
|
||||||
" The API key for the `/metrics` route must have no limitation on the indexes.",
|
.message
|
||||||
);
|
.push_str(" The API key for the `/metrics` route must allow access to all indexes.");
|
||||||
return Err(error);
|
return Err(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ static INVALID_RESPONSE: Lazy<Value> = Lazy::new(|| {
|
|||||||
});
|
});
|
||||||
|
|
||||||
static INVALID_METRICS_RESPONSE: Lazy<Value> = Lazy::new(|| {
|
static INVALID_METRICS_RESPONSE: Lazy<Value> = Lazy::new(|| {
|
||||||
json!({"message": "The provided API key is invalid. The API key for the `/metrics` route must have no limitation on the indexes.",
|
json!({"message": "The provided API key is invalid. The API key for the `/metrics` route must allow access to all indexes.",
|
||||||
"code": "invalid_api_key",
|
"code": "invalid_api_key",
|
||||||
"type": "auth",
|
"type": "auth",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
"link": "https://docs.meilisearch.com/errors#invalid_api_key"
|
||||||
|
Loading…
Reference in New Issue
Block a user