If an error occurs in the middleware layer,
such as an exception generated by keystoneclient,
there is no stack trace provided, leaving the
issue difficult to debug.
Log a stack trace here with LOG.exception instead.
Change-Id: I7bc7c74e8b701fac351572a3bb9d934c7f67d425
def _error(self, inner, req):
if not isinstance(inner, exception.QuotaError):
- LOG.error(_LE("Caught error: %(type)s %(error)s"),
- {'type': type(inner),
- 'error': inner})
+ LOG.exception(_LE("Caught error: %(type)s %(error)s"),
+ {'type': type(inner),
+ 'error': inner})
safe = getattr(inner, 'safe', False)
headers = getattr(inner, 'headers', None)
status = getattr(inner, 'code', 500)