Pimp error where no document is provided

This commit is contained in:
many 2021-10-28 12:13:51 +02:00
parent ff0908d3fa
commit 59636fa688
No known key found for this signature in database
GPG key ID: 2CEF23B75189EACA
3 changed files with 30 additions and 20 deletions

View file

@ -695,10 +695,10 @@ async fn error_add_no_documents() {
let (response, code) = index.add_documents(json!([]), None).await;
let expected_response = json!({
"message": "A json payload is missing.",
"code": "missing_payload",
"message": "The `json` payload must contain at least one document.",
"code": "malformed_payload",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#missing_payload"
"link": "https://docs.meilisearch.com/errors#malformed_payload"
});
assert_eq!(response, expected_response);