mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
feat(API-keys): Change immutable_field error message
Change the immutable_field error message to fit the recent changes in the spec:
aa0a148ee3..84a9baff68
This commit is contained in:
parent
08d72e32a4
commit
9eea142e2b
@ -28,7 +28,7 @@ pub enum AuthControllerError {
|
|||||||
ApiKeyNotFound(String),
|
ApiKeyNotFound(String),
|
||||||
#[error("`uid` field value `{0}` is already an existing API key.")]
|
#[error("`uid` field value `{0}` is already an existing API key.")]
|
||||||
ApiKeyAlreadyExists(String),
|
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),
|
ImmutableField(String),
|
||||||
#[error("Internal error: {0}")]
|
#[error("Internal error: {0}")]
|
||||||
Internal(Box<dyn Error + Send + Sync + 'static>),
|
Internal(Box<dyn Error + Send + Sync + 'static>),
|
||||||
|
@ -1150,7 +1150,7 @@ async fn error_patch_api_key_indexes() {
|
|||||||
let (response, code) = server.patch_api_key(&uid, content).await;
|
let (response, code) = server.patch_api_key(&uid, content).await;
|
||||||
assert_eq!(400, code, "{:?}", &response);
|
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",
|
"code": "immutable_field",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#immutable_field"
|
"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;
|
let (response, code) = server.patch_api_key(&uid, content).await;
|
||||||
assert_eq!(400, code, "{:?}", &response);
|
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",
|
"code": "immutable_field",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#immutable_field"
|
"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;
|
let (response, code) = server.patch_api_key(&uid, content).await;
|
||||||
assert_eq!(400, code, "{:?}", &response);
|
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",
|
"code": "immutable_field",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#immutable_field"
|
"link": "https://docs.meilisearch.com/errors#immutable_field"
|
||||||
|
Loading…
Reference in New Issue
Block a user