Log the traceback in _handle_keystone_exception

Some errors were logged without a traceback because they were
logged as a warning instead.

Change-Id: I68595e4e2c37279585f0434a173596e43e047004
Related-Bug: #1965316
This commit is contained in:
Grzegorz Grasza 2022-03-17 15:58:44 +01:00
parent 433f541b97
commit 3f628a9ae4
1 changed files with 1 additions and 3 deletions

View File

@ -81,10 +81,8 @@ def _handle_keystone_exception(error):
LOG.warning(
"Authorization failed. %(exception)s from %(remote_addr)s",
{'exception': error, 'remote_addr': flask.request.remote_addr})
elif isinstance(error, exception.UnexpectedError):
LOG.exception(str(error))
else:
LOG.warning(str(error))
LOG.exception(str(error))
# Render the exception to something user "friendly"
error_message = error.args[0]