Repository navigation
feat: informative transcription errors + one-click retry - #47
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
handle_transcriptionexcept) now records an actionableError: <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./transcribealready surfacesError:-prefixed statuses, so the user now sees the real reason.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_errormapping;/transcribereturns 400 with the informative message../scripts/docker_e2e.sh— PASS.