output error if sending to trusted key server failed

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-02 00:45:03 -04:00 committed by June
parent 935202eaa3
commit 667db8e8a3

View file

@ -1445,7 +1445,7 @@ impl Service {
) -> Result<()> { ) -> Result<()> {
for server in services().globals.trusted_servers() { for server in services().globals.trusted_servers() {
info!("Asking batch signing keys from trusted server {}", server); info!("Asking batch signing keys from trusted server {}", server);
if let Ok(keys) = services() match services()
.sending .sending
.send_federation_request( .send_federation_request(
server, server,
@ -1455,6 +1455,7 @@ impl Service {
) )
.await .await
{ {
Ok(keys) => {
debug!("Got signing keys: {:?}", keys); debug!("Got signing keys: {:?}", keys);
let mut pkm = pub_key_map.write().await; let mut pkm = pub_key_map.write().await;
for k in keys.server_keys { for k in keys.server_keys {
@ -1479,11 +1480,14 @@ impl Service {
pkm.insert(k.server_name.to_string(), result); pkm.insert(k.server_name.to_string(), result);
} }
} else { },
Err(e) => {
warn!( warn!(
"Failed sending batched key request to trusted key server {server} for the remote servers \ "Failed sending batched key request to trusted key server {server} for the remote servers \
{servers:?}" {:?}: {e}",
servers
); );
},
} }
} }