mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Pimp error where no document is provided
This commit is contained in:
parent
ff0908d3fa
commit
59636fa688
3 changed files with 30 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue