diff options
author | Erik Johnston <erik@matrix.org> | 2019-02-14 13:58:52 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-02-14 14:01:04 +0000 |
commit | 7fc1196a362fc56d11e2652ee5c9699b1198cf40 (patch) | |
tree | fac7a253674cb2039c82bcc2eb58fea8b6bc3881 /synapse/crypto | |
parent | Merge pull request #4450 from 14mRh4X0r/fix-dependency-message (diff) | |
download | synapse-7fc1196a362fc56d11e2652ee5c9699b1198cf40.tar.xz |
Correctly handle RequestSendFailed exceptions
This mainly reduces the number of exceptions we log.
Diffstat (limited to 'synapse/crypto')
-rw-r--r-- | synapse/crypto/keyring.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 3a96980bed..cce40fdd2d 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -35,7 +35,7 @@ from unpaddedbase64 import decode_base64 from twisted.internet import defer -from synapse.api.errors import Codes, SynapseError +from synapse.api.errors import Codes, RequestSendFailed, SynapseError from synapse.util import logcontext, unwrapFirstError from synapse.util.logcontext import ( LoggingContext, @@ -656,7 +656,7 @@ def _handle_key_deferred(verify_request): try: with PreserveLoggingContext(): _, key_id, verify_key = yield verify_request.deferred - except IOError as e: + except (IOError, RequestSendFailed) as e: logger.warn( "Got IOError when downloading keys for %s: %s %s", server_name, type(e).__name__, str(e), |