Merge "Update Fault class to pass error key up"

This commit is contained in:
Zuul 2019-09-12 06:42:31 +00:00 committed by Gerrit Code Review
commit 6be279e35b
1 changed files with 3 additions and 2 deletions

View File

@ -717,9 +717,10 @@ class Fault(webob.exc.HTTPException):
fault_name = self._fault_names.get(code, "computeFault") fault_name = self._fault_names.get(code, "computeFault")
explanation = self.wrapped_exc.explanation explanation = self.wrapped_exc.explanation
fault_data = { fault_data = {
fault_name: { 'error': {
'code': code, 'code': code,
'message': explanation}} 'message': explanation,
'fault_name': fault_name}}
if code == 413: if code == 413:
retry = self.wrapped_exc.headers.get('Retry-After', None) retry = self.wrapped_exc.headers.get('Retry-After', None)
if retry: if retry: