mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Add a new Error for when a user use a non-filtered attribute in a filter
This commit is contained in:
parent
713acc408b
commit
4eda438f6f
@ -56,6 +56,7 @@ pub enum UserError {
|
||||
FilterParsing(pest::error::Error<ParserRule>),
|
||||
InvalidCriterionName { name: String },
|
||||
InvalidDocumentId { document_id: Value },
|
||||
InvalidFilterAttribute(pest::error::Error<ParserRule>),
|
||||
InvalidStoreFile,
|
||||
MissingDocumentId { document: Object },
|
||||
MissingPrimaryKey,
|
||||
@ -204,6 +205,7 @@ impl fmt::Display for UserError {
|
||||
let json = serde_json::to_string(document_id).unwrap();
|
||||
write!(f, "document identifier is invalid {}", json)
|
||||
},
|
||||
Self::InvalidFilterAttribute(error) => error.fmt(f),
|
||||
Self::MissingDocumentId { document } => {
|
||||
let json = serde_json::to_string(document).unwrap();
|
||||
write!(f, "document doesn't have an identifier {}", json)
|
||||
|
Loading…
Reference in New Issue
Block a user