mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
Fix Index name parsing error message to fit the specification
This commit is contained in:
@ -352,7 +352,7 @@ async fn error_add_api_key_invalid_parameters_indexes() {
|
||||
assert_eq!(400, code, "{:?}", &response);
|
||||
|
||||
let expected_response = json!({
|
||||
"message": r#"`{"name":"products"}` is not a valid index uid. It should be an array of string representing index names."#,
|
||||
"message": r#"`indexes` field value `{"name":"products"}` is invalid. It should be an array of string representing index names."#,
|
||||
"code": "invalid_api_key_indexes",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_api_key_indexes"
|
||||
@ -377,7 +377,7 @@ async fn error_add_api_key_invalid_index_uids() {
|
||||
let (response, code) = server.add_api_key(content).await;
|
||||
|
||||
let expected_response = json!({
|
||||
"message": r#"`["invalid index # / \\name with spaces"]` is not a valid index uid. It should be an array of string representing index names."#,
|
||||
"message": r#"`invalid index # / \name with spaces` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."#,
|
||||
"code": "invalid_api_key_indexes",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_api_key_indexes"
|
||||
|
Reference in New Issue
Block a user