@oss-autopilot/core - v3.7.0
    Preparing search index...

    Function nonFatalCatch

    • Build a .catch() handler for the "non-fatal parallel fetch" pattern used by daily.ts and dashboard-data.ts (#960). When a sibling fetch fails during a bulk-parallel orchestration, we want:

      • rate-limit / auth errors to propagate (those abort the whole run — the user needs to see them), and
      • every other error to log a warning and fall back to a safe default so the other siblings can still succeed.

      Inline at each call site, this is ~4 lines of boilerplate repeated 10+ times. Consolidated here so the rate-limit-rethrow rule lives in exactly one place.

      Type Parameters

      • T

      Parameters

      • params: { fallback: T; label: string; module: string }

      Returns (err: unknown) => T

      prMonitor.fetchRecentlyClosedPRs().catch(
      nonFatalCatch({ module: MODULE, label: 'fetch recently closed PRs', fallback: [] as ClosedPR[] })
      );