Description
When trying to add an empty string document in Meilisearch the error message should be:
{
"message": "A json payload is missing.",
"code": "missing_payload",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#missing_payload"
}
Expected behavior
Receive a formal message for this case from Meilisearch API.
Current behavior
The following error message is received when the method is used in this way:
client.index('movies').add_documents('')
{
"message": "The 'json' payload provided is malformed. Couldn't serialize document value: data did not match any variant of untagged enum Either.",
"code": "malformed_payload",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#malformed_payload"
}
Environment (please complete the following information):
- Meilisearch version: v.0.29.1
- meilisearch-python version: v0.22.1