Accepts empty payload on add document routes #319
Locked
gmourier
started this conversation in
Feedback & Feature Proposal
Replies: 3 comments 7 replies
-
I'm not okay with an error, but maybe a warning 😇 |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have a few questions to try to go further
|
Beta Was this translation helpful? Give feedback.
4 replies
-
Lock since implemented in v0.26.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Since the
v0.24.0
, MeiliSearch raises an error when no documents are sent onPOST
/PUT
Add Documents routes. e.g.[]
Although the main idea is to guide developers more easily to understand that they are not sending anything concrete on the way to add documents especially when the response is asynchronous but on the other side it can be verbose in the case the developers implement an indexing pipeline that might receive messages with an empty payload.
It forces them to check if the payload of documents is empty before calling the method to avoid raising/silently catching the error.
We would like to have your opinion on what you find the most coherent.
👍 Keep this error when the call is made without any documents in the payload.
👎 Remove this error and allow the call to this route without any documents in the payload.
Beta Was this translation helpful? Give feedback.
All reactions