Repackage

Errors

Every status code Repackage returns and what to do about it.

All errors share a single envelope:

{
  "error": {
    "code": "snake_case_code",
    "message": "Human-readable explanation.",
    "retryable": true
  }
}

retryable is your single signal: if true, the same request might succeed later (transient upstream issue, rate limit). If false, change the request.

Auth and plan errors

StatusCodeMeaning
401unauthorizedNo credentials, or the session expired.
401invalid_api_keyKey is malformed, revoked, or expired.
402plan_limit_exceededMonthly quota hit. Includes limit, used, resetAt, scope.
403feature_not_in_planEndpoint requires Pro and the caller is on Free. Includes feature, tier.
409no_active_organizationSession has no org. Sign out and back in.

Request errors

StatusCodeMeaning
400invalid_requestBody or query parameters failed validation.
400invalid_video_idCouldn't resolve an 11-character video ID from the input.
404not_foundResource doesn't exist or isn't visible to your org.
422unprocessableRequest shape is right but values aren't usable (e.g. private video).

Transcript-specific errors

StatusCodeMeaning
404video_not_foundVideo ID doesn't resolve on YouTube.
422transcript_unavailableVideo exists but has no transcript and we couldn't generate one.
422video_age_restrictedVideo is age-gated; we can't fetch without an auth cookie.
422video_privatePrivate or unlisted with restricted access.

Server / upstream errors

StatusCodeRetryableMeaning
429rate_limitedyesToo many requests in the current IP / org window.
500internal_erroryesSomething in our pipeline failed.
502upstream_failureyesYouTube or a downstream service is unhappy.

For retryable errors, exponential backoff (start at 1s, max 30s) is enough. For 429, look for Retry-After.

On the MCP side

MCP errors come back as a regular tool result with isError: true:

{
  "isError": true,
  "content": [
    { "type": "text", "text": "transcript_unavailable: Video exists but has no transcript." }
  ]
}

Codes match the table above.

On this page