Description of problem: When deleting nonexistent snapshot using REST API using POST, the response is { "success": false, "message": "No snapshots available for this VM" } and the HTTP status is 200 (success) When deleting nonexistent snapshot using using the DELETE HTTP method, the response is empty and and the HTTP status is 204 (success). The responses are inconsistent with responses from other collections where the "ActiveRecord::RecordNotFound" error is returned and the HTTP status is 404 (not found). E.g. deleting nonexistent VM: { "error": { "kind": "not_found", "message": "Couldn't find Vm with 'id'=199999 ...", "klass": "ActiveRecord::RecordNotFound" } } HTTP status 404 Version-Release number of selected component (if applicable): 5.8.1.0 How reproducible: Very Steps to Reproduce: 1. POST https://10.8.197.241/api/vms/<id_of_existing_vm>/snapshots/2222 {"action": "delete"} or DELETE https://10.8.197.241/api/vms/<id_of_existing_vm>/snapshots/2222 Expected results: "ActiveRecord::RecordNotFound", HTTP status 404
PR: https://github.com/ManageIQ/manageiq/pull/15489
Verified that deleting nonexistent snapshot using REST API results in ActiveRecord::RecordNotFound"