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

Commit

Permalink
Merge pull request #3997 from matrix-org/erikj/fix_profile_error_hand…
Browse files Browse the repository at this point in the history
…ling

Fix exception handling in fetching remote profiles
  • Loading branch information
erikjohnston authored Oct 3, 2018
2 parents 25baf3b + 6e0c66f commit 01afcfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
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

0 comments on commit 01afcfc

Please sign in to comment.