Error message handling incorrectly accesses error response title
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-barbicanclient |
New
|
Undecided
|
Unassigned |
Bug Description
barbicanclient/
def _get_error_
try:
message = response_
except ValueError:
message = resp.content
return message
It appears response_data does not always contain a "title" attribute - but if response_data contains an "error" attribute, "error" usually has a title hanging off of it. I express this in uncertain terms as there are probably thousands of potential methods that access this.
I believe the fix is:
If response_data has an "error" attribute and the "error" attribute has a "title", return "title" as the error message, else return the response content.
I was able to reproduce the error by using the barbican_
description: | updated |
description: | updated |
description: | updated |
summary: |
- Error message handling incorrectly accesses error respones title + Error message handling incorrectly accesses error response title |