summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-07-20 11:35:23 +0100
committerGitHub <noreply@github.com>2021-07-20 11:35:23 +0100
commitf3ac9c6750524ebd142610bc499546955c22fd35 (patch)
tree2f1f22ccabf9e6e27235ef11c1c9239d9b9c359f
parentFactorise `get_datastore` calls in phone_stats_home. (#10427) (diff)
downloadsynapse-f3ac9c6750524ebd142610bc499546955c22fd35.tar.xz
Fix exception when failing to get remote room list (#10414)
-rw-r--r--changelog.d/10414.bugfix1
-rw-r--r--synapse/handlers/room_list.py6
2 files changed, 6 insertions, 1 deletions
diff --git a/changelog.d/10414.bugfix b/changelog.d/10414.bugfix
new file mode 100644
index 0000000000..bfebed8d29
--- /dev/null
+++ b/changelog.d/10414.bugfix
@@ -0,0 +1 @@
+Fix a number of logged errors caused by remote servers being down.
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py
index 6284bcdfbc..fae2c098e3 100644
--- a/synapse/handlers/room_list.py
+++ b/synapse/handlers/room_list.py
@@ -383,7 +383,11 @@ class RoomListHandler(BaseHandler):
                 ):
                     logger.debug("Falling back to locally-filtered /publicRooms")
                 else:
-                    raise  # Not an error that should trigger a fallback.
+                    # Not an error that should trigger a fallback.
+                    raise SynapseError(502, "Failed to fetch room list")
+            except RequestSendFailed:
+                # Not an error that should trigger a fallback.
+                raise SynapseError(502, "Failed to fetch room list")
 
             # if we reach this point, then we fall back to the situation where
             # we currently don't support searching across federation, so we have