better error message

This commit is contained in:
Christian Schwarz
2024-09-15 13:45:10 +01:00
parent e6e72e8b68
commit 2fafe47e09

View File

@@ -1134,7 +1134,11 @@ impl Timeline {
self.get_vectored_reconstruct_data(keyspace.clone(), lsn, reconstruct_state, ctx)
.instrument(debug_span!("get_vectored_reconstruct_data", invocation))
.await
.with_context(|| format!("get_vectored_reconstruct_data invocation {invocation}"))?;
.map_err(|err| {
anyhow::anyhow!(
"get_vectored_reconstruct_data invocation {invocation}: keyspace={keyspace} {err:?}",
)
})?;
get_data_timer.stop_and_record();
let reconstruct_timer = crate::metrics::RECONSTRUCT_TIME