From 78c563b77ce141f61b13e0a00f16687a15704224 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 11 Mar 2019 14:11:10 +0000 Subject: [PATCH 1/2] Correctly log expected errors when fetching server keys --- synapse/crypto/keyring.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 7474fd515..0207cd989 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -686,9 +686,9 @@ def _handle_key_deferred(verify_request): try: with PreserveLoggingContext(): _, key_id, verify_key = yield verify_request.deferred - except (IOError, RequestSendFailed) as e: + except KeyLookupError as e: logger.warn( - "Got IOError when downloading keys for %s: %s %s", + "Failed to download keys for %s: %s %s", server_name, type(e).__name__, str(e), ) raise SynapseError( From 33dfd9a288b7b891cb31fdd099948d56435d4986 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 11 Mar 2019 14:13:58 +0000 Subject: [PATCH 2/2] Newsfile --- changelog.d/4847.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4847.misc diff --git a/changelog.d/4847.misc b/changelog.d/4847.misc new file mode 100644 index 000000000..a001238e0 --- /dev/null +++ b/changelog.d/4847.misc @@ -0,0 +1 @@ +Correctly log expected errors when fetching server keys.