Fix inner has no attribute 'message'
When DBDeadlock in karbor-api service, it get the following error: AttributeError: 'DBDeadlock' object has no attribute 'message'. This patch corrects that problem. Change-Id: I1b268f5cca2c4efdcfb055d2fd8dfe522e6daf9d Closes-Bug: #1891571
This commit is contained in:
parent
0764f5dab1
commit
e167485dd7
|
@ -39,7 +39,9 @@ class FaultWrapper(base_wsgi.Middleware):
|
|||
status, webob.exc.HTTPInternalServerError)()
|
||||
|
||||
def _error(self, inner, req):
|
||||
LOG.error('Middleware error occurred: %s', inner.message)
|
||||
LOG.error('Middleware error occurred: %(type)s %(error)s',
|
||||
{'type': type(inner),
|
||||
'error': inner})
|
||||
safe = getattr(inner, 'safe', False)
|
||||
headers = getattr(inner, 'headers', None)
|
||||
status = getattr(inner, 'code', http_client.INTERNAL_SERVER_ERROR)
|
||||
|
|
Loading…
Reference in New Issue