log room ID for invalid room topic event errors
Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
parent
06ab707c79
commit
fbd8090b0b
2 changed files with 5 additions and 1 deletions
|
@ -221,6 +221,7 @@ pub(crate) async fn get_public_rooms_filtered_helper(
|
|||
serde_json::from_str(s.content.get())
|
||||
.map(|c: RoomTopicEventContent| Some(c.topic))
|
||||
.map_err(|_| {
|
||||
error!("Invalid room topic event in database for room {}", room_id);
|
||||
Error::bad_database("Invalid room topic event in database.")
|
||||
})
|
||||
})?,
|
||||
|
|
|
@ -326,7 +326,10 @@ impl Service {
|
|||
.map_or(Ok(None), |s| {
|
||||
serde_json::from_str(s.content.get())
|
||||
.map(|c: RoomTopicEventContent| Some(c.topic))
|
||||
.map_err(|_| Error::bad_database("Invalid room topic event in database."))
|
||||
.map_err(|_| {
|
||||
error!("Invalid room topic event in database for room {}", room_id);
|
||||
Error::bad_database("Invalid room topic event in database.")
|
||||
})
|
||||
})?,
|
||||
world_readable: services()
|
||||
.rooms
|
||||
|
|
Loading…
Reference in a new issue