Issue #746
closedAPI - update a repository with invalid importer config returns 404 and misleading error
Description
Description
Response implies that the repo_id is not found, when it is actually the importer_config that is causing the problem. Since this data was passed in the body rather than the url, this should be a 400 and the importer_config
should be the invalid param.
Steps to reporoduce
test4 is a valid repository
curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X PUT -d '{"importer_config": {}}' -D- -k -u admin:admin https://localhost/pulp/api/v2/repositories/test4/
HTTP/1.1 404 Not Found
Date: Tue, 10 Mar 2015 18:50:38 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.3.2 Python/2.7.8
Content-Encoding: utf-8
Content-Length: 385
Content-Type: application/json
{"http_request_method": "PUT", "exception": null, "error_message": "Missing resource(s): resource_id=test4", "_href": "/pulp/api/v2/repositories/test4/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"resource_id": "test4"}}, "description": "Missing resource(s): resource_id=test4", "sub_errors": []}, "traceback": null, "resources": {"resource_id": "test4"}}
This problem will be unaffected by the Django work because it occurs in the manager:
https://github.com/pulp/pulp/blob/master/server/pulp/server/managers/repo/importer.py#L250
Updated by dkliban@redhat.com about 9 years ago
- Severity set to Low
- Triaged changed from No to Yes
Updated by ipanova@redhat.com almost 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Updated by ipanova@redhat.com over 8 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
ipanova@redhat.com)
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.