mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 10:33:02 -05:00
Fix shared error array in SimpleFin batch sync catch block
When simpleFinBatchSync() threw an error, all accounts received the same errors array by reference and errors accumulated across accounts. Each account now gets its own isolated errors array with a single error specific to that account, matching the pattern used by accountsBankSync(). Fixes #6623 https://claude.ai/code/session_011ebiiXRMmbiKxYMohVXL6o
This commit is contained in:
@@ -1098,19 +1098,17 @@ async function simpleFinBatchSync({
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
const errors = [];
|
||||
for (const account of accounts) {
|
||||
const error = err as Error;
|
||||
retVal.push({
|
||||
accountId: account.id,
|
||||
res: {
|
||||
errors,
|
||||
errors: [handleSyncError(error, account)],
|
||||
newTransactions: [],
|
||||
matchedTransactions: [],
|
||||
updatedAccounts: [],
|
||||
},
|
||||
});
|
||||
const error = err as Error;
|
||||
errors.push(handleSyncError(error, account));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user