logging: Log exception name also in auth_complete.

`HTTPError` has empty string for `str(HTTPError())`. Logging it
as it is would not be much helpful. So, this commits adds code
to log the name of error also.
This commit is contained in:
Dinesh 2020-06-03 01:02:06 +05:30 committed by Tim Abbott
parent d30f11888a
commit e22ca9483e
1 changed files with 1 additions and 1 deletions

View File

@ -1362,7 +1362,7 @@ class SocialAuthMixin(ZulipAuthMixin, ExternalAuthMethod):
# the flow or the IdP is unreliable and returns a bad http response),
# don't throw a 500, just send them back to the
# login page and record the event at the info log level.
self.logger.info(str(e))
self.logger.info(f"{e.__class__.__name__}: {str(e)}")
return None
except SocialAuthBaseException as e:
# Other python-social-auth exceptions are likely