Actions
Issue #804
closedAPI call to associate/unassociate a unit to with bad criteria returns unhelpful exception
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
A call to /v2/repositories/<destination_repo_id>/actions/associate/
with invalid criteria returns an unhelpful exception.
To replicate
curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X POST -d '{"source_repo_id": "zoo", "criteria": {"bad": "criteria"}}' -k -u admin:admin "https://localhost/pulp/api/v2/repositories/test/actions/associate/" | python -mjson.tool
Actual Result
{
"_href": "/pulp/api/v2/repositories/test/actions/associate/",
"args": [],
"error": {
"code": "PLP0000",
"data": {},
"description": "Pulp exception occurred: PulpDataException",
"sub_errors": []
},
"error_message": "Pulp exception occurred: PulpDataException",
"exception": null,
"http_request_method": "POST",
"http_status": 400,
"traceback": null
}
Expected Result
{
"_href": "/pulp/api/v2/repositories/test/actions/associate/",
"error": {
"code": "PLP0015",
"data": {
"properties": "['repo_criteria']",
"property_names": [
"repo_criteria"
]
},
"description": "Invalid properties: ['repo_criteria']",
"sub_errors": [
{
"code": "PLP0015",
"data": {
"properties": "['bad']",
"property_names": [
"bad"
]
},
"description": "Invalid properties: ['bad']",
"sub_errors": []
}
]
},
"error_message": "Invalid properties: ['repo_criteria']",
"exception": null,
"http_request_method": "POST",
"http_status": 400,
"property_names": [
"repo_criteria"
],
"traceback": null
}
Note: This will be fixed in the Django Conversion
Updated by amacdona@redhat.com over 9 years ago
- Subject changed from API call to associate content to another repo eats the exceptions for bad criteria to API call to associate/unassociate a unit to with bad criteria returns unhelpful exception
Added by Austin Macdonald over 9 years ago
Added by Austin Macdonald over 9 years ago
Updated by Anonymous over 9 years ago
- Status changed from ASSIGNED to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|089b0f0e6cd0d10063b354af59df0c4dde9e2fac.
Updated by rbarlow over 9 years ago
- Platform Release changed from master to 2.7.0
Updated by dkliban@redhat.com over 9 years ago
- Status changed from MODIFIED to 5
Updated by pthomas@redhat.com over 9 years ago
verified
[root@mgmt4 ~]# rpm -qa pulp-server
pulp-server-2.7.0-0.4.beta.el6.noarch
[root@mgmt4 ~]#
{
"http_request_method":"POST",
"exception":null,
"error_message":"Invalid properties: ['criteria']",
"property_names":[
"criteria"
],
"_href":"/pulp/api/v2/repositories/test/actions/associate/",
"http_status":400,
"error":{
"code":"PLP0015",
"data":{
"property_names":[
"criteria"
],
"properties":"['criteria']"
},
"description":"Invalid properties: ['criteria']",
"sub_errors":[
{
"code":"PLP0015",
"data":{
"property_names":[
"bad"
],
"properties":"['bad']"
},
"description":"Invalid properties: ['bad']",
"sub_errors":[
]
}
]
},
"traceback":null
}
Updated by amacdona@redhat.com about 9 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Actions
django conversion - repositories
closes #707 closes #749 closes #756 closes #804 closes #805 closes #812