Issue #319
closed404 is not raised if the content installation is made on non existent consumer
Description
$ curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X POST -k -u admin:admin -d '{}' "https://localhost/pulp/api/v2/consumers/no-consumer/actions/content/install/"
HTTP/1.1 400 Bad Request
Date: Thu, 26 Feb 2015 10:29:56 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 465
Connection: close
Content-Type: application/json
{"http_request_method": "POST", "exception": null, "error_message": "Missing values for: ['units', 'options']", "_href": "/pulp/api/v2/consumers/no-consumer/actions/content/install/", "http_status": 400, "error": {"code": "PLP0016", "data": {"property_names": ["units", "options"], "properties": "['units', 'options']"}, "description": "Missing values for: ['units', 'options']", "sub_errors": []}, "missing_property_names": ["units", "options"], "traceback": null}[
I expect:
{"http_request_method": "POST", "exception": null, "error_message": "Missing resource(s): resource_id=no-consumer", "_href": "/pulp/api/v2/consumers/no-consumer/actions/content/install/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"resource_id": "no-consumer"}}, "description": "Missing resource(s): resource_id=no-consumer", "sub_errors": []}, "traceback": null, "resources": {"resource_id": "no-consumer"}}