Skip to content
Snippets Groups Projects
Unverified Commit 686319e2 authored by Timo Kösters's avatar Timo Kösters
Browse files

fix: error handling

parent d655f4c1
No related branches found
No related tags found
No related merge requests found
......@@ -342,7 +342,7 @@ pub(crate) fn gen_event_id_canonical_json(
let room_id = value
.get("room_id")
.and_then(|id| RoomId::parse(id.as_str()?).ok())
.expect("Invalid room id in event");
.ok_or_else(|| Error::bad_database("PDU in db has invalid room_id."))?;
let room_version_id = db.rooms.get_room_version(&room_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment