mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
fix a wrong error code + update some error messages
This commit is contained in:
parent
bf573885ea
commit
6d658f4c52
@ -44,7 +44,7 @@ pub struct SearchQuery {
|
||||
pub hits_per_page: Option<usize>,
|
||||
#[deserr(error = DeserrError<InvalidSearchAttributesToRetrieve>)]
|
||||
pub attributes_to_retrieve: Option<BTreeSet<String>>,
|
||||
#[deserr(error = DeserrError<InvalidSearchAttributesToRetrieve>)]
|
||||
#[deserr(error = DeserrError<InvalidSearchAttributesToCrop>)]
|
||||
pub attributes_to_crop: Option<Vec<String>>,
|
||||
#[deserr(error = DeserrError<InvalidSearchCropLength>, default = DEFAULT_CROP_LENGTH())]
|
||||
pub crop_length: usize,
|
||||
|
@ -384,7 +384,7 @@ async fn search_bad_matching_strategy() {
|
||||
snapshot!(code, @"400 Bad Request");
|
||||
snapshot!(json_string!(response), @r###"
|
||||
{
|
||||
"message": "Incorrect tag value at `.matchingStrategy`.",
|
||||
"message": "Json deserialize error: unknown value `doggo`, expected one of `last`, `all` at `.matchingStrategy`.",
|
||||
"code": "invalid_search_matching_strategy",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy"
|
||||
@ -395,7 +395,7 @@ async fn search_bad_matching_strategy() {
|
||||
snapshot!(code, @"400 Bad Request");
|
||||
snapshot!(json_string!(response), @r###"
|
||||
{
|
||||
"message": "Incorrect tag value at `.matchingStrategy`.",
|
||||
"message": "Json deserialize error: unknown value `doggo`, expected one of `last`, `all` at `.matchingStrategy`.",
|
||||
"code": "invalid_search_matching_strategy",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy"
|
||||
|
Loading…
Reference in New Issue
Block a user