Closed MassimoC closed 5 years ago
on v1/CustomizationController.cs
if (customization.InventoryLevel <= 0)
{
return BadRequest();
}
405 "Method Not Allowed" to be used when a HTTP method is not allowed for a specific resource Few alternatives to 400:
I think that, for the case where you cannot sell a car because there is no inventory, a 409 statuscode would be appropriate
This should not result in a BadRequest response.
A BadRequest indicates that something is wrong at the client-level; something is wrong with the request object. This is not the case when you have no inventory left. A NotAllowed statuscode might be more appropriate although I'm not convinced of it either.
This issue is related to this code
_Originally posted by @fgheysels