replace panics on unknown room versions with errors
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
c70ce49ec0
commit
5c4b8ad7a3
3 changed files with 40 additions and 5 deletions
|
@ -439,7 +439,13 @@ impl Service {
|
|||
self.redact_pdu(redact_id, pdu)?;
|
||||
}
|
||||
}
|
||||
_ => panic!("Unexpected room version {}", room_version_id),
|
||||
_ => {
|
||||
warn!("Unexpected or unsupported room version {}", room_version_id);
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::BadJson,
|
||||
"Unexpected or unsupported room version found",
|
||||
));
|
||||
}
|
||||
};
|
||||
}
|
||||
TimelineEventType::SpaceChild => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue