From dc938323a2a1794213f21f652b06d0db28009dbb Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Mon, 2 Nov 2026 20:06:16 -0500 Subject: [PATCH] fix(search): log only the error kind when a search cancel fails Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- crates/buzz-search/src/cancel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/buzz-search/src/cancel.rs b/crates/buzz-search/src/cancel.rs index 1ca4bf2090..b7f89d53b8 100644 --- a/crates/buzz-search/src/cancel.rs +++ b/crates/buzz-search/src/cancel.rs @@ -119,7 +119,7 @@ async fn cancel(pool: &PgPool, (pid, started_us): (i32, i64)) -> &'static str { let mut conn = match tokio::time::timeout(CANCEL_ACQUIRE_TIMEOUT, pool.acquire()).await { Ok(Ok(conn)) => conn, Ok(Err(e)) => { - tracing::warn!(error = %e, pid, "search cancel could not get a connection"); + tracing::warn!(error_kind = %buzz_db::error::sqlx_error_kind(&e), pid, "search cancel could not get a connection"); return "error"; } Err(_) => return "pool_busy", @@ -133,7 +133,7 @@ async fn cancel(pool: &PgPool, (pid, started_us): (i32, i64)) -> &'static str { Ok(None) => elsewhere.push(conn), Ok(Some(signalled)) => return signal_outcome(signalled), Err(e) => { - tracing::warn!(error = %e, pid, "search cancel failed"); + tracing::warn!(error_kind = %buzz_db::error::sqlx_error_kind(&e), pid, "search cancel failed"); return "error"; } }