Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #10770] Status code 200 even if an object could not be deleted. #3745
This issue has been migrated from Redmine: https://dev.icinga.com/issues/10770
Created by rjunich on 2015-12-03 18:24:04 +00:00
When trying to delete an object on which others depend without cascade=1, the returned status code is 200. The returned JSON however contains the code 500 and the error message "Object cannot be deleted because other objects depend on it. Use cascading delete to delete it anyway."
The status code should be changed to something different than 200 to indicate that the request was not successful.
2016-03-01 15:53:52 +00:00 by jflach 9cdea73
2016-03-11 14:59:52 +00:00 by jflach 4cf33b7
Updated by jflach on 2016-02-26 14:26:56 +00:00
Currently we iterate over all objects matching the filter and try to delete them. For every successful deletion we add a 200 to the json return body and for every failure we add a 500.
Now we can and should send a 500 (or maybe even a 409) when all of the deletes fail. But what should we send when there are successful and failed deletions?