Open johnzuk opened 7 months ago
Going to tag @jiffyclub on this for a quick reply. Thanks!
I personally think I would reject the whole batch if there was a failure and return an error code relevant to the first error I found. I would stop processing the batch at the first error and return that one.
Yes I agree with @jiffyclub. Stop at the first error and return that one. Is that standard behavior, or is a note needed in the spec to make this more clear?
Let's decide on the behavior and wording change to the spec, and we can add this in 2.1.
Probably worth a note so we don't get too many wildly divergent implementations, but the most important part is setting an HTTP error code so the client knows something went wrong and look into it. As long as there's an error and the error message is useful the client can investigate.
I want to clarify bulk responses error http codes.
Let's assume i want process multiple vehicles through
agency/vehicles
endpoint - lets say 3 of them. Lets say first vehicle is already registered, second one has wrong type in fileddevice_id
and third one is correct. What should be api response and http code in that case? Should it be 409 or 400 or 201 and response like: