Fix exception handling in fetching remote profiles

This commit is contained in:
Erik Johnston 2018-10-03 11:34:30 +01:00
parent 25baf3b2ac
commit 495a9d06bb

View File

@ -142,9 +142,7 @@ class BaseProfileHandler(BaseHandler):
if e.code != 404:
logger.exception("Failed to get displayname")
raise
except Exception:
logger.exception("Failed to get displayname")
else:
defer.returnValue(result["displayname"])
@defer.inlineCallbacks
@ -199,8 +197,6 @@ class BaseProfileHandler(BaseHandler):
if e.code != 404:
logger.exception("Failed to get avatar_url")
raise
except Exception:
logger.exception("Failed to get avatar_url")
defer.returnValue(result["avatar_url"])