show error when state res fails

This commit is contained in:
Timo Kösters 2023-06-30 22:50:45 +02:00
parent b4065a3e28
commit 62fcba7176
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB

View file

@ -624,7 +624,7 @@ impl Service {
.collect::<Result<_>>()?, .collect::<Result<_>>()?,
), ),
Err(e) => { Err(e) => {
warn!("State resolution on prev events failed, either an event could not be found or deserialization: {}", e); warn!("State resolution on prev events failed, either an event could not be found or deserialization failed: {}", e);
None None
} }
} }
@ -967,8 +967,9 @@ impl Service {
res.ok().flatten() res.ok().flatten()
}) { }) {
Ok(new_state) => new_state, Ok(new_state) => new_state,
Err(_) => { Err(e) => {
return Err(Error::bad_database("State resolution failed, either an event could not be found or deserialization")); warn!("State resolution on prev events failed, either an event could not be found or deserialization failed: {}", e);
return Err(Error::bad_database("State resolution failed, either an event could not be found or deserialization failed"));
} }
}; };