Skip to content

Closed — see replacement PR#753

Closed
brafdlog wants to merge 1 commit intomasterfrom
fix/exporter-isolate-failures
Closed

Closed — see replacement PR#753
brafdlog wants to merge 1 commit intomasterfrom
fix/exporter-isolate-failures

Conversation

@brafdlog
Copy link
Copy Markdown
Owner

@brafdlog brafdlog commented Apr 17, 2026

This PR was closed. Content has been removed.

Previously, when any exporter's `exportTransactions` threw (e.g. the CSV
exporter hitting an EPERM on a locked Documents folder), the catch block
re-threw the error and `Promise.all(exportPromises)` rejected
fail-fast. This orphaned any still-running exporters (e.g. YNAB), skipped
the summary log, and prevented the EXPORT_PROCESS_END event from firing.
The entire scrape would then appear to fail even though the other
exporters could have succeeded.

Fix (belt and suspenders):
- Remove the `throw e` in the per-exporter catch block. The outcome is
  already recorded via successCount/failedCount counters and the
  EXPORTER_ERROR event — re-throwing added nothing but the fail-fast
  behavior.
- Switch `Promise.all` to `Promise.allSettled` so even an unexpected
  error outside the try/catch cannot abort other exporters or skip the
  summary.

Add tests covering both invariants: other exporters continue running
when one throws, and the function resolves (does not reject) with a
partial result.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@brafdlog brafdlog closed this Apr 17, 2026
@brafdlog brafdlog deleted the fix/exporter-isolate-failures branch April 17, 2026 07:54
@brafdlog brafdlog changed the title Fix: one failed exporter should not abort the others Closed — see replacement PR Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Please fix the title of this PR.

Format: Prefix: description (max 80 chars)

Allowed prefixes: Breaking, Build, Chore, Fix, New, Update, Upgrade, Deps, feat, fix, chore, docs, refactor, test, ci

Examples:

Fix: resolve login issue
New: add account toggle feature (fixes #123)
feat: improve logging infrastructure
feat(logging): add sanitization

See more in release.config.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant