diff --git a/meilisearch-auth/src/error.rs b/meilisearch-auth/src/error.rs index dbf28b421..8be97daaf 100644 --- a/meilisearch-auth/src/error.rs +++ b/meilisearch-auth/src/error.rs @@ -28,7 +28,7 @@ pub enum AuthControllerError { ApiKeyNotFound(String), #[error("`uid` field value `{0}` is already an existing API key.")] ApiKeyAlreadyExists(String), - #[error("`{0}` field cannot be modified for the given resource.")] + #[error("The `{0}` field cannot be modified for the given resource.")] ImmutableField(String), #[error("Internal error: {0}")] Internal(Box), diff --git a/meilisearch-http/tests/auth/api_keys.rs b/meilisearch-http/tests/auth/api_keys.rs index 4eb1fdd6f..d7e7dad0f 100644 --- a/meilisearch-http/tests/auth/api_keys.rs +++ b/meilisearch-http/tests/auth/api_keys.rs @@ -1150,7 +1150,7 @@ async fn error_patch_api_key_indexes() { let (response, code) = server.patch_api_key(&uid, content).await; assert_eq!(400, code, "{:?}", &response); - let expected = json!({"message": "`indexes` field cannot be modified for the given resource.", + let expected = json!({"message": "The `indexes` field cannot be modified for the given resource.", "code": "immutable_field", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#immutable_field" @@ -1206,7 +1206,7 @@ async fn error_patch_api_key_actions() { let (response, code) = server.patch_api_key(&uid, content).await; assert_eq!(400, code, "{:?}", &response); - let expected = json!({"message": "`actions` field cannot be modified for the given resource.", + let expected = json!({"message": "The `actions` field cannot be modified for the given resource.", "code": "immutable_field", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#immutable_field" @@ -1254,7 +1254,7 @@ async fn error_patch_api_key_expiration_date() { let (response, code) = server.patch_api_key(&uid, content).await; assert_eq!(400, code, "{:?}", &response); - let expected = json!({"message": "`expiresAt` field cannot be modified for the given resource.", + let expected = json!({"message": "The `expiresAt` field cannot be modified for the given resource.", "code": "immutable_field", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#immutable_field"