Can't really catch when and how does the error occur, but based on my http client logs, some times rest api returns 400 error with a "A duplicate entry was detected" message, even tho
1) no records were in DB with the the same unique id field
2) request was sent with upsert=true
on the screenshot absolutely the same request was sent multiple times, first time failing in 400, second actually created an entry and following basically updated nothing(same payload for all requests)
I assume it might be because of slow select db query during first request, but can't really prove it