fix: format context (#5022)

We return an error with unformatted `{timeline_id}`.
This commit is contained in:
Joonas Koivunen
2023-08-17 17:30:25 +03:00
committed by GitHub
parent 64fc7eafcd
commit 6af5f9bfe0

View File

@@ -1104,8 +1104,9 @@ impl Tenant {
{
match e {
LoadLocalTimelineError::Load(source) => {
return Err(anyhow::anyhow!(source)
.context("Failed to load local timeline: {timeline_id}"))
return Err(anyhow::anyhow!(source)).with_context(|| {
format!("Failed to load local timeline: {timeline_id}")
})
}
LoadLocalTimelineError::ResumeDeletion(source) => {
// Make sure resumed deletion wont fail loading for entire tenant.