mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-20 17:24:03 +01:00
Log error message when we fail to fetch remote server keys
This commit is contained in:
parent
12bcf3d179
commit
5b5c7a28d6
1 changed files with 11 additions and 2 deletions
|
@ -50,18 +50,27 @@ class Keyring(object):
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
verify_key = yield self.get_server_verify_key(server_name, key_ids)
|
verify_key = yield self.get_server_verify_key(server_name, key_ids)
|
||||||
except IOError:
|
except IOError as e:
|
||||||
|
logger.warn(
|
||||||
|
"Got IOError when downloading keys for %s: %s %s",
|
||||||
|
server_name, type(e).__name__, str(e.message),
|
||||||
|
)
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
502,
|
502,
|
||||||
"Error downloading keys for %s" % (server_name,),
|
"Error downloading keys for %s" % (server_name,),
|
||||||
Codes.UNAUTHORIZED,
|
Codes.UNAUTHORIZED,
|
||||||
)
|
)
|
||||||
except:
|
except Exception as e:
|
||||||
|
logger.warn(
|
||||||
|
"Got Exception when downloading keys for %s: %s %s",
|
||||||
|
server_name, type(e).__name__, str(e.message),
|
||||||
|
)
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
401,
|
401,
|
||||||
"No key for %s with id %s" % (server_name, key_ids),
|
"No key for %s with id %s" % (server_name, key_ids),
|
||||||
Codes.UNAUTHORIZED,
|
Codes.UNAUTHORIZED,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
verify_signed_json(json_object, server_name, verify_key)
|
verify_signed_json(json_object, server_name, verify_key)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue