Skip to content

bug: bare catch blocks in summary-manager.js swallow non-ENOENT errors #45

@wiggitywhitney

Description

@wiggitywhitney

Problem

In src/managers/summary-manager.js, catch blocks around file reads (e.g., readFile, readWeekDailySummaries, readMonthWeeklySummaries) catch all errors and return []. This silently hides permission errors, disk-full errors, and other I/O failures — making them look like "no data found."

Expected behavior

Only suppress ENOENT (file not found). Rethrow all other errors so they surface to the caller.

Suggested fix

} catch (err) {
  if (err.code === 'ENOENT') return [];
  throw err;
}

Found by CodeRabbit review on wiggitywhitney/spinybacked-orbweaver-eval#7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions