What's the right HTTP status code for a response when I can't perform a DELETE due to a FK constrain?
问题 What would be the right response I should give to the users when they try to DELETE an entity on a datasource sitting behind a rest/odata api, and the operation cannot be performed due to a foreign key constrain? Is it a bad request? A not acceptable? A server-side error (>=500)? 回答1: Just found this website that says that '409 Conflict' should be used when 'the request could not be completed due to a conflict with the current state of the resource' and 'where it is expected that the user