Update Fault class to pass error key up
While debugging nova-compute logs it was noted that error messages were not being populated rather the fault_name was. Updating the response we hand back to Nova to contain message within the 'error' key of the returned object. Change-Id: I2e0f415a512e53261b1e366cd75b310dd06eec27
This commit is contained in:
parent
f32dd28f2e
commit
657e75c5e1
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue