Better error handling
This commit is contained in:
@@ -218,8 +218,14 @@ Notes (M5):
|
||||
exercised for real (browser half still needs the manual run).
|
||||
|
||||
## M6 — Hardening & polish
|
||||
- [ ] Error taxonomy: unsupported file, out-of-memory (suggest smaller model),
|
||||
WebGPU device-lost, network loss mid-download (resume or clear retry)
|
||||
- [x] Error taxonomy: unsupported file, out-of-memory (suggest smaller model),
|
||||
WebGPU device-lost, network loss mid-download (resume or clear retry) —
|
||||
pure `classifyError` in `src/lib/errors.ts` (D-030) sorts every failure
|
||||
path (decode, load, transcribe, a crashed worker) into one of the four
|
||||
categories plus a generic fallback, each with a user-facing message and
|
||||
an actionable suggestion; the error box in `App.tsx` adds a Retry
|
||||
button for the two retryable kinds (network, device-lost), replaying
|
||||
the failed load or the last file. Unit-tested in `tests/errors.test.ts`.
|
||||
- [x] Cancel in-flight transcription (both engines) — browser engine via
|
||||
worker termination (D-018), server engine via aborting the
|
||||
`/api/transcribe` fetch (D-018 amendment; landed with M5's EngineToggle)
|
||||
|
||||
Reference in New Issue
Block a user