🧹 improve observability by adding console.debug to empty catch blocks

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 <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-14 13:55:21 +00:00
1 parent c731f2b09d
commit 983ad0627b
1 file changed
+4 -2
+4 -2
View File
@@ -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
}