Merge pull request #4847 from matrix-org/erikj/fix_stacktrace_keyring

Correctly log expected errors when fetching server keys
pull/4852/head
Erik Johnston 2019-03-11 17:12:20 +00:00 committed by GitHub
commit 9c0e6e8e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/4847.misc Normal file
View File

@ -0,0 +1 @@
Correctly log expected errors when fetching server keys.

View File

@ -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(