From 1bf078c58524c3eb9a8f4af8649a009699fd198e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 1 Sep 2022 10:07:34 +0200 Subject: [PATCH] room: Print error message when deserialization fails --- src/session/room/event/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/session/room/event/mod.rs b/src/session/room/event/mod.rs index 004cc344..4da549fe 100644 --- a/src/session/room/event/mod.rs +++ b/src/session/room/event/mod.rs @@ -174,8 +174,8 @@ impl Event { pub fn new(pure_event: SyncRoomEvent, room: &Room) -> Self { SupportedEvent::try_from_event(pure_event.clone(), room) .map(|event| event.upcast()) - .unwrap_or_else(|_| { - warn!("Failed to deserialize event: {:?}", pure_event); + .unwrap_or_else(|error| { + warn!("Failed to deserialize event: {error}; {pure_event:?}"); UnsupportedEvent::new(pure_event, room).upcast() }) }