Actions
Issue #750
closedCall to remove a nonexisting importer results in a misleading 404 (missing repo)
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Description
A call to remove a nonexisting importer correctly returns a 404, however the information is misleading. In this case the repo exists, the importer does not, however it suggests that the repo does not exist and makes no mention about the importer.
Actual Results
$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool
{
"_href": "/pulp/api/v2/repositories/test/importers/fake/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"repository": "test"
}
},
"description": "Missing resource(s): repository=test",
"sub_errors": []
},
"error_message": "Missing resource(s): repository=test",
"exception": null,
"http_request_method": "DELETE",
"http_status": 404,
"resources": {
"repository": "test"
},
"traceback": null
}
Expected Results
$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool
{
"_href": "/pulp/api/v2/repositories/test/importers/fake/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"repository": "test"
}
},
"description": "Missing resource(s): importer_id=fake",
"sub_errors": []
},
"error_message": "Missing resource(s): importer_id=fake",
"exception": null,
"http_request_method": "DELETE",
"http_status": 404,
"resources": {
"repository": "test"
},
"traceback": null
}
Note
This problem occurs in the manager so it will not be fixed by the django work.
Actions
Fixing get, update, delete call when non existent importer is provided.
closes #750 https://pulp.plan.io/issues/750