From 1d4abbf40f27f4c5c833f0b25fb28b62327b8976 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 3 Jun 2020 14:12:13 +0100 Subject: [PATCH] Fix exceptions when fetching events from a down host. (#7622) We already caught some exceptions, but not all. --- changelog.d/7622.bugfix | 1 + synapse/handlers/federation.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/7622.bugfix diff --git a/changelog.d/7622.bugfix b/changelog.d/7622.bugfix new file mode 100644 index 000000000000..bcb82f7b0b8e --- /dev/null +++ b/changelog.d/7622.bugfix @@ -0,0 +1 @@ +Fix exceptions when fetching events from a remote host fails. diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 75ec90d26730..3e60774b3317 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -501,7 +501,7 @@ async def _get_missing_events_for_pdu(self, origin, pdu, prevs, min_depth): min_depth=min_depth, timeout=60000, ) - except RequestSendFailed as e: + except (RequestSendFailed, HttpResponseException, NotRetryingDestination) as e: # We failed to get the missing events, but since we need to handle # the case of `get_missing_events` not returning the necessary # events anyway, it is safe to simply log the error and continue.