Actions
Issue #756
closedApi call to get a scheduled sync or publish with invalid schedule_id returns 400
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 GET request to /v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/<schedule_id>/
returns a 400 if schedule_id is not a valid bson ObjectId.
Since this information is passed in the url, it should instead be a 404.
To reproduce
The schedule id must not be a bson ObjectId.
$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/yum_importer/schedules/sync/not_valid_bson_object_id/ | python -mjson.tool
{
"_href": "/pulp/api/v2/repositories/test/importers/yum_importer/schedules/sync/not_valid_bson_object_id/",
"error": {
"code": "PLP0015",
"data": {
"properties": "['schedule_ids']",
"property_names": [
"schedule_ids"
]
},
"description": "Invalid properties: ['schedule_ids']",
"sub_errors": []
},
"error_message": "Invalid properties: ['schedule_ids']",
"exception": null,
"http_request_method": "GET",
"http_status": 400,
"property_names": [
"schedule_ids"
],
"traceback": null
}
Note
This will be fixed in the Django conversion.
Actions
django conversion - repositories
closes #707 closes #749 closes #756 closes #804 closes #805 closes #812