diff --git a/meilisearch-types/src/keys.rs b/meilisearch-types/src/keys.rs index bfa48ffcb..ec0ec60a5 100644 --- a/meilisearch-types/src/keys.rs +++ b/meilisearch-types/src/keys.rs @@ -330,8 +330,9 @@ impl Deserr for Action { Some(action) => Ok(action), None => Err(deserr::take_cf_content(E::error::( None, - deserr::ErrorKind::Unexpected { - msg: format!("string must be a valid action, got {}", s), + deserr::ErrorKind::UnknownValue { + value: &s, + accepted: &Self::SERDE_MAP_ARR.map(|(ser_action, _)| ser_action), }, location, ))),