summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-10-03 14:11:09 +0100
committerGitHub <noreply@github.com>2018-10-03 14:11:09 +0100
commit01afcfc4e9af4b583183e37863ab019b11735ba6 (patch)
treecc09aa24ed9c686be48ccbdc77257cc93fab1657
parentMerge pull request #3991 from matrix-org/erikj/fix_pop_retry_cache (diff)
parentNewsfile (diff)
downloadsynapse-01afcfc4e9af4b583183e37863ab019b11735ba6.tar.xz
Merge pull request #3997 from matrix-org/erikj/fix_profile_error_handling
Fix exception handling in fetching remote profiles
-rw-r--r--changelog.d/3997.bugfix1
-rw-r--r--synapse/handlers/profile.py8
2 files changed, 3 insertions, 6 deletions
diff --git a/changelog.d/3997.bugfix b/changelog.d/3997.bugfix
new file mode 100644
index 0000000000..b060ee8c18
--- /dev/null
+++ b/changelog.d/3997.bugfix
@@ -0,0 +1 @@
+Fix exception handling in fetching remote profiles
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index f284d5a385..1dfbde84fd 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -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"])