fix: error handling
This commit is contained in:
parent
d655f4c1be
commit
686319e2e3
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue