I have a rest that receives among other things, a date and with it, makes a reservation. The problem occurs when 2 people "at the same time" try to book on the same day, at the same time.
Obviously, the first one who makes the request, will be able to book the appointment, so I will return a status of 200. On the other hand, the one that arrives later, will make the same request, but the server will throw an error because it can not reserve the Same appointment (already reserved). In this case, what http state code should be thrown?
A family code of 500 would not seem right, because the exception that is thrown, is caused by the very logic of the business.
On the other hand, a state code of the family of 400 would not seem right either because the request is well formulated
Thanks!