Commit e2fc8e8
committed
fix: surface cancelLogin failures instead of swallowing them in console
Both cancel paths (resetToPasswordFlow and handleDelete) reset the UI
optimistically and fired cancelLogin() without handling failure beyond a
console.error - on a network failure the server-side pending challenge
silently survived until its 300s TTL while the UI told the user it was
cancelled.
Extract the duplicated call into a single cancelPendingLogin() helper
that warns the user via the existing snackbar when the server-side
invalidation fails, so they know the pending verification will only die
by its own TTL. The optimistic reset is kept - the user asked to cancel,
so returning control immediately stays correct.
PR #142 review finding LOW #2.1 parent 246c777 commit e2fc8e8
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| |||
315 | 331 | | |
316 | 332 | | |
317 | 333 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 334 | + | |
321 | 335 | | |
322 | 336 | | |
323 | 337 | | |
| |||
643 | 657 | | |
644 | 658 | | |
645 | 659 | | |
646 | | - | |
647 | | - | |
648 | | - | |
| 660 | + | |
649 | 661 | | |
650 | 662 | | |
651 | 663 | | |
| |||
0 commit comments