actualbudget / actualbudget/actual

Add consistent error handling to all four provider reset handlers in CreateAccountModal

Aperta
#7,659 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
28.7k
Fork
3k
Merge medio
2g 11h
PR unite (30g)
65

Descrizione

## Summary

The four bank-sync provider reset handlers in `packages/desktop-client/src/components/modals/CreateAccountModal.tsx` — `onGoCardlessReset`, `onSimpleFinReset`, `onPluggyAiReset`, and `onEnableBankingReset` — all chain `secret-set` IPC calls without `try/catch` and are invoked via `void`, meaning any rejection is silently dropped with no user feedback and an ambiguous UI state.

## Steps to Reproduce / Context

Flagged during review of PR #7345 (Enable Banking integration). The Enable Banking handler (`onEnableBankingReset`) uses `await Promise.all([...])` so it can reject, while the GoCardless/SimpleFIN/PluggyAI handlers chain `void send(...).then(...)` — all four share the same missing-error-handling issue.

## Proposed Fix

Wrap each reset handler in a `try/catch`, only update setup state on success, and surface an error notification (e.g. via `addNotification`) on failure so the user knows the reset did not complete.

## References

- PR: https://github.com/actualbudget/actual/pull/7345
- Review comment: https://github.com/actualbudget/actual/pull/7345#discussion_r3159466250
- Requested by: @AurelDemiri

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.