Here is an example of a REST response for an exception:
---
400 Bad Request
The server could not comply with the request since it is either malformed or otherwise incorrect.
Remote error: StackValidationFailed {'Error': 'Provided KeyName is not registered with nova'}
---
The first 2 lines are redundant and unhelpful. The last line has useful information in a form which is difficult to parse.
It would be good if the response was fully parseable json, something like this:
{
"code": 400,
"title": "Bad Request",
"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.",
"error": {
"type": "StackValidationFailed",
"message": "Provided KeyName is not registered with nova",
"field": "KeyName" **
}
** bonus points for providing a field so something in the UI can be highlighted.
Fix proposed to branch: master /review. openstack. org/36678
Review: https:/