Skip to content

A failed YouTube import reports error_detail "unknown" with no message #434

Closed

Description

@thcp

Split out of #432, where it made a two-part diagnosis take a full reverse-engineering session.

Every yt-dlp failure lands in the job as error_detail: "unknown" with nothing attached, so the only way to find out what happened is to read data/logs/.

There are two independent causes, and either one alone is enough to produce the bare string:

  1. _CAUSE_PATTERNS in app/pipeline/errors.py has no download category at all. Bot checks, HTTP 429, and "Requested format is not available" all fall through to the "unknown" default, which is honest but useless.
  2. _quarantine_failed_job in app/pipeline/runner.py only appends a message if tail:, and tail exists only on SeparationError. A yt-dlp DownloadError never carries one, so even a correctly classified cause would arrive with no detail.

Fix:

  • add source-blocked (bot check, HTTP 429, too many requests) and source-unavailable (requested format is not available, only images are available, n challenge solving failed) to _CAUSE_PATTERNS
  • fall back to redact(str(exc)) when there is no tail, so the message always reaches error_detail

One trap worth recording: the user-facing string cannot be fixed on the server. static/js/job.js renders state.error verbatim with an i18n key only as fallback, so a new English message there ships untranslated to six locales with nothing failing. The server sends the cause code and the client maps code to key, which is what notifications.js already does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions