Fix exceptions when fetching events from a down host. (#7622)

We already caught some exceptions, but not all.
pull/7629/head
Erik Johnston 2020-06-03 14:12:13 +01:00 committed by GitHub
parent 38d4ebbac7
commit 11dc2b4698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/7622.bugfix Normal file
View File

@ -0,0 +1 @@
Fix exceptions when fetching events from a remote host fails.

View File

@ -501,7 +501,7 @@ class FederationHandler(BaseHandler):
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.