Closed
Conversation
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>
Contributor
|
Please fix the title of this PR. Format: Allowed prefixes: Examples: See more in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was closed. Content has been removed.