From 983ad0627b3c259df5d6bee4f9b5396531b49a83 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 14 Feb 2026 13:55:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20improve=20observability=20by=20a?= =?UTF-8?q?dding=20console.debug=20to=20empty=20catch=20blocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced empty catch blocks in `loadCanonicalRoster` and `parseLockEvent` with `console.debug` statements that log the error message. This improves observability of failures while maintaining the graceful fallback behavior. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/lib.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.mjs b/src/lib.mjs index d36b5d8..6abddb0 100644 --- a/src/lib.mjs +++ b/src/lib.mjs @@ -151,7 +151,8 @@ function loadCanonicalRoster() { } console.error(`WARNING: Roster file is missing daily/weekly entries, falling back: ${rosterPath}`); - } catch { + } catch (err) { + console.debug(`Note: Could not load roster from ${rosterPath}: ${err.message}`); // It's okay if roster file is missing when used as a library/CLI without the file present } @@ -205,7 +206,8 @@ export function parseLockEvent(event) { if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) { content = parsed; } - } catch { + } catch (err) { + console.debug(`Note: Failed to parse event content as JSON: ${err.message}`); // Ignore malformed JSON content }