diff options
author | Erik Johnston <erikj@jki.re> | 2019-03-11 17:12:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 17:12:20 +0000 |
commit | 9c0e6e8e7c52922fa4e892e2f396599459d4c416 (patch) | |
tree | 84333f042b8f2bc195480bc651b6b562bca37958 | |
parent | Merge pull request #4839 from matrix-org/anoa/no_captcha_tests (diff) | |
parent | Newsfile (diff) | |
download | synapse-9c0e6e8e7c52922fa4e892e2f396599459d4c416.tar.xz |
Merge pull request #4847 from matrix-org/erikj/fix_stacktrace_keyring
Correctly log expected errors when fetching server keys
-rw-r--r-- | changelog.d/4847.misc | 1 | ||||
-rw-r--r-- | synapse/crypto/keyring.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/4847.misc b/changelog.d/4847.misc new file mode 100644 index 0000000000..a001238e08 --- /dev/null +++ b/changelog.d/4847.misc @@ -0,0 +1 @@ +Correctly log expected errors when fetching server keys. diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 7474fd515f..0207cd989a 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( |