room: Print error message when deserialization fails

This commit is contained in:
Kévin Commaille 2022-09-01 10:07:34 +02:00
parent 837444b572
commit 1bf078c585
No known key found for this signature in database
GPG key ID: DD507DAE96E8245C

View file

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