From 6af5f9bfe0cf4e8b3544ee27290303bce2c4dc1e Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Thu, 17 Aug 2023 17:30:25 +0300 Subject: [PATCH] fix: format context (#5022) We return an error with unformatted `{timeline_id}`. --- pageserver/src/tenant.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index 524e3a60a1..cedb381ccc 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -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.