From 60cc07134f3d80f0ba25d4bc1b6736c30494f947 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 24 Oct 2024 11:24:37 +0000 Subject: [PATCH] log error for auth_chain corruption immediately Signed-off-by: Jason Volk --- src/service/rooms/auth_chain/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/service/rooms/auth_chain/mod.rs b/src/service/rooms/auth_chain/mod.rs index f3861ca3..1387bc7d 100644 --- a/src/service/rooms/auth_chain/mod.rs +++ b/src/service/rooms/auth_chain/mod.rs @@ -167,10 +167,12 @@ impl Service { Err(e) => debug_error!(?event_id, ?e, "Could not find pdu mentioned in auth events"), Ok(pdu) => { if pdu.room_id != room_id { - return Err!(Request(Forbidden( - "auth event {event_id:?} for incorrect room {} which is not {room_id}", - pdu.room_id, - ))); + return Err!(Request(Forbidden(error!( + ?event_id, + ?room_id, + wrong_room_id = ?pdu.room_id, + "auth event for incorrect room" + )))); } for auth_event in &pdu.auth_events {