Commit af9abb0
fix: prevent UI from hanging on unexpected errors during capture flow
Add comprehensive try/catch error handling to all critical paths in the
photo capture flow. Previously, only .fail() callbacks had error handling
while .done() callbacks and other functions could silently crash, leaving
the UI stuck on the loader screen with takingPic=true.
Changes:
- Wrap errorPic cleanup in try/catch so page reload always fires
- Add fallback timeout (5s) if notificationTimeout is NaN
- Add try/catch to thrill(), takePic(), callTakePicApi .done(),
callTakeVideoApi .done(), processPic success, processVideo success
- Add missing timeout (25s) to callTakeVideoApi jQuery post1 parent 68c3579 commit af9abb0
3 files changed
+376
-321
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments