mirror of
https://github.com/element-hq/synapse
synced 2024-08-16 15:50:52 +00:00
Fix exception handling in fetching remote profiles
This commit is contained in:
parent
25baf3b2ac
commit
495a9d06bb
1 changed files with 2 additions and 6 deletions
|
@ -142,10 +142,8 @@ 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.returnValue(result["displayname"])
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def set_displayname(self, target_user, requester, new_displayname, by_admin=False):
|
||||
|
@ -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"])
|
||||
|
||||
|
|
Loading…
Reference in a new issue