You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignee: jflach
Status: Resolved (closed on 2016-03-01 16:25:04 +00:00)
Target Version: 2.4.4
Last Update: 2016-03-11 15:00:02 +00:00 (in Redmine)
Icinga Version: 2.4.1
Backport?: Already backported
Include in Changelog: 1
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.
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.
The code of the http response is 200 regardless of the result of the deletions.
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?
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
Assignee: jflach
Status: Resolved (closed on 2016-03-01 16:25:04 +00:00)
Target Version: 2.4.4
Last Update: 2016-03-11 15:00:02 +00:00 (in Redmine)
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.
Changesets
2016-03-01 15:53:52 +00:00 by jflach 9cdea73
2016-03-11 14:59:52 +00:00 by jflach 4cf33b7
The text was updated successfully, but these errors were encountered: