actualbudget / actualbudget/actual

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

Offen Anfängerfreundlich
#7,659 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
28.8k
Forks
3k
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
65

Beschreibung

## 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start in packages/desktop-client/src/components/modals/CreateAccountModal.tsx and inspect onGoCardlessReset, onSimpleFinReset, onPluggyAiReset, and onEnableBankingReset, including the review context from PR #7345. Done means failed secret-set calls produce an error notification, setup state changes only after success, and all four handlers handle rejections consistently.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
desktop, frontend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
78/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.