Merge pull request #61 from PR0M3TH3AN/fix-empty-catch-blocks-17156965692183891029

🧹 improve observability by adding console.debug to empty catch blocks
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-14 12:07:34 -05:00
commit cc1df8d304
1 file changed
+4 -2
+4 -2
View File
@@ -153,7 +153,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
}
@@ -207,7 +208,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
}