improvement: log bad database errors automatically

This commit is contained in:
timokoesters 2020-06-11 10:03:08 +02:00
parent 2368a90584
commit 56d4742201
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
13 changed files with 278 additions and 208 deletions

View file

@ -60,7 +60,7 @@ impl PduEvent {
let old_content = self
.content
.as_object_mut()
.ok_or(Error::BadDatabase("PDU has invalid content"))?;
.ok_or_else(|| Error::bad_database("PDU in db has invalid content."))?;
let mut new_content = serde_json::Map::new();