fix: ConfirmDialog silently swallows async errors from onConfirm #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Major
File:
src/components/game/ConfirmDialog.tsx(lines 102-112)Problem: The
handleConfirmfunction catches errors in afinallyblock but doesn't display them to the user. IfonConfirm()throws, the dialog closes silently with no feedback that the action failed.Impact: Users get no feedback when confirm actions fail. They may think an action succeeded when it actually failed.
Fix: Add error state and display it in the dialog:
[priority: 4] BROKEN FEATURE — ConfirmDialog silently swallows async errors from onConfirm.
Starting work on #47. Reading ConfirmDialog.tsx to fix async error swallowing.
Fixed. Added error state to ConfirmDialog. The handleConfirm function now catches errors from onConfirm() and displays them in a red error box inside the dialog instead of silently swallowing them. The dialog stays open when an error occurs so the user can see the failure message.