From b5fdf8b27ce56eefc13937046256f199c0d48dba Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Fri, 6 Feb 2026 18:19:24 +0000 Subject: [PATCH] fix(logging): log errors instead of silently discarding with .ok() Replace silent .ok() calls with explicit match + warn! logging in encode_quick_notes and passkey deserialization for exclude lists. --- src/infrastructure/repositories/brews.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/repositories/brews.rs b/src/infrastructure/repositories/brews.rs index 488fb43..328a90b 100644 --- a/src/infrastructure/repositories/brews.rs +++ b/src/infrastructure/repositories/brews.rs @@ -68,7 +68,13 @@ impl SqlBrewRepository { None } else { let labels: Vec<&str> = notes.iter().map(|n| n.label()).collect(); - serde_json::to_string(&labels).ok() + match serde_json::to_string(&labels) { + Ok(json) => Some(json), + Err(err) => { + tracing::warn!(error = %err, "failed to encode quick notes as JSON"); + None + } + } } }