Add key value to deserialize errors
Some checks failed
trivy / Check (push) Failing after 9s

This commit is contained in:
mdecimus 2024-10-17 17:41:48 +02:00
parent 9e78aaa751
commit 3635577706
6 changed files with 14 additions and 6 deletions

View file

@ -135,7 +135,8 @@ impl DirectoryStore for Store {
Ok(true)
},
)
.await.caused_by(trc::location!())?;
.await
.caused_by(trc::location!())?;
}
Ok(results)

View file

@ -206,7 +206,9 @@ impl QueueManagement for Server {
.iterate(
IterateParams::new(from_key, to_key).ascending(),
|key, value| {
let message = Bincode::<queue::Message>::deserialize(value)?.inner;
let message = Bincode::<queue::Message>::deserialize(value)
.add_context(|ctx| ctx.ctx(trc::Key::Key, key))?
.inner;
let matches = tenant_domains
.as_ref()
.map_or(true, |domains| message.has_domain(domains))

View file

@ -227,7 +227,8 @@ impl ManageReports for Server {
Ok(max_total == 0 || total < max_total)
},
)
.await.caused_by(trc::location!())?;
.await
.caused_by(trc::location!())?;
Ok(JsonResponse::new(json!({
"data": {

View file

@ -118,7 +118,9 @@ impl Indexer for Server {
)
.await
.map_err(|err| {
trc::error!(err.caused_by(trc::location!()).details("Failed to iterate over index emails"));
trc::error!(err
.caused_by(trc::location!())
.details("Failed to iterate over index emails"));
});
// Add entries to the index

View file

@ -559,7 +559,8 @@ impl DmarcReporting for Server {
}
},
)
.await.caused_by(trc::location!())?;
.await
.caused_by(trc::location!())?;
for (record, count) in record_map {
report = report.with_record(record.with_count(count));

View file

@ -366,7 +366,8 @@ impl TlsReporting for Server {
Ok(true)
}
})
.await.caused_by(trc::location!())?;
.await
.caused_by(trc::location!())?;
// Add policy
report.policies.push(Policy {