summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgirlbossceo <june@girlboss.ceo>2023-07-31 01:02:52 +0000
committerJune <june@girlboss.ceo>2023-08-03 08:54:47 -1000
commitfbd8090b0bf47ba1a4ed818c84e374b50d39c94a (patch)
tree0136b7f74348f1ce45966ef4b7f6855ecdbb5103
parent06ab707c79b58df2eca96add0f419755e3522bdf (diff)
downloadconduit-fbd8090b0bf47ba1a4ed818c84e374b50d39c94a.zip
log room ID for invalid room topic event errors
Signed-off-by: girlbossceo <june@girlboss.ceo>
-rw-r--r--src/api/client_server/directory.rs1
-rw-r--r--src/service/rooms/spaces/mod.rs5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/api/client_server/directory.rs b/src/api/client_server/directory.rs
index a812dbc..50ae9f1 100644
--- a/src/api/client_server/directory.rs
+++ b/src/api/client_server/directory.rs
@@ -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.")
})
})?,
diff --git a/src/service/rooms/spaces/mod.rs b/src/service/rooms/spaces/mod.rs
index e92fc07..9b57d53 100644
--- a/src/service/rooms/spaces/mod.rs
+++ b/src/service/rooms/spaces/mod.rs
@@ -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