Skip to content

feat: informative transcription errors + one-click retry - #47

Merged
lkmeta merged 1 commit into
mainfrom
feat/informative-errors
Aug 15, 2026
Merged

lkmeta merged 1 commit into
mainfrom
feat/informative-errors

Conversation

@lkmeta

@lkmeta lkmeta commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Problem

A failed transcription showed a generic "Failed to start transcription process" — so a user couldn't tell a transient YouTube block (worth retrying) from a bad file. This is the error-handling half of the intermittent YouTube 403.

Change

  • The worker's failure path (handle_transcription except) now records an actionable Error: <detail> status. friendly_error() maps the common cases — YouTube 403 / bot-check, unavailable/private video, rate-limit (429), network/timeout, unreadable media (ffmpeg) — and falls back to the trimmed real message.
  • /transcribe already surfaces Error:-prefixed statuses, so the user now sees the real reason.
  • The error dialog gets a "Try again" button that re-submits the same request (transient failures, esp. YouTube).

Not included: bumping yt-dlp / adding a JS runtime to reduce the 403s themselves — separate, uncertain; this makes the failure clear and retryable, which is the pragmatic win.

Evidence

  • pytest — 70 passed: friendly_error mapping; /transcribe returns 400 with the informative message.
  • Against the container: an invalid upload shows "Couldn't read the media file — it may be corrupt ..." with a working Try again; the retry button is hidden for non-retryable alerts.
  • ./scripts/docker_e2e.sh — PASS.

Failures showed a generic "Failed to start transcription process", so a user
couldn't tell a transient YouTube block from a bad file. Now the worker's
failure path records an actionable reason (friendly_error maps the common
cases — YouTube 403/bot-check, unavailable video, rate-limit, network,
unreadable media — and falls back to the trimmed real message). /transcribe
already surfaces "Error: ..." statuses, so the user sees the real cause.

The error dialog also gets a "Try again" button that re-submits the same
request (these failures, especially YouTube, are often transient).

Verified: pytest 70 (friendly_error mapping; /transcribe returns 400 with the
message); against the container, an invalid upload shows "Couldn't read the
media file ..." with a working Try again; docker_e2e.sh PASS.
@lkmeta
lkmeta merged commit d55bd20 into main Aug 15, 2026
4 checks passed
@lkmeta
lkmeta deleted the feat/informative-errors branch August 15, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant