Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix exception handling in fetching remote profiles #3997

Merged
merged 2 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/3997.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix exception handling in fetching remote profiles
8 changes: 2 additions & 6 deletions synapse/handlers/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ def get_displayname(self, target_user):
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):
Expand Down Expand Up @@ -199,8 +197,6 @@ def get_avatar_url(self, target_user):
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"])

Expand Down