mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
fix the fields field of the POST fetch document API
This commit is contained in:
parent
ce6507d20c
commit
469d2f2a9c
3 changed files with 13 additions and 8 deletions
|
@ -726,11 +726,11 @@ async fn fetch_document_by_filter() {
|
|||
}
|
||||
"###);
|
||||
|
||||
let (response, code) = index.get_document_by_filter(json!({ "fields": ["doggo"] })).await;
|
||||
let (response, code) = index.get_document_by_filter(json!({ "fields": "doggo" })).await;
|
||||
snapshot!(code, @"400 Bad Request");
|
||||
snapshot!(json_string!(response), @r###"
|
||||
{
|
||||
"message": "Invalid value type at `.fields`: expected a string, but found an array: `[\"doggo\"]`",
|
||||
"message": "Invalid value type at `.fields`: expected an array, but found a string: `\"doggo\"`",
|
||||
"code": "invalid_document_get_fields",
|
||||
"type": "invalid_request",
|
||||
"link": "https://docs.meilisearch.com/errors#invalid_document_get_fields"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue