Errors
Failed requests return:
{ "error": { "code": "INSUFFICIENT_CREDITS", "message": "...", "details": {} } }Use error.code in your client. The same HTTP status can mean more than one code.
| Code | HTTP | When |
|---|---|---|
UNAUTHENTICATED | 401 | Missing key |
INVALID_API_KEY | 401 | Unknown or deleted key |
INSUFFICIENT_SCOPE | 403 | Key is missing a required scope |
PERMISSION_DENIED | 403 | Not allowed on this resource |
ROLE_CANNOT_PRODUCE | 403 | Workspace member cannot create |
NOT_FOUND | 404 | Unknown resource |
INVALID_ARGUMENT | 400 | Bad body or job id |
UNSUPPORTED_SOURCE | 422 | Source type or URL is not supported |
DURATION_UNKNOWN | 422 | Import duration could not be resolved |
INSUFFICIENT_CREDITS | 429 | Not enough credits to quote, reserve, or create |
CONFLICT / ALREADY_EXISTS | 409 | Duplicate YouTube import, and similar |
IDEMPOTENCY_REPLAY | 409 | Same idempotency key, different body |
RATE_LIMITED | 429 | Key concurrency cap |
PREVIEW_NOT_DOWNLOADABLE | 422 | Preview dub, full artifact requested |
DOWNLOAD_TIER_NONE | 422 | Account cannot download |
FAILED_PRECONDITION | 422 | Pipeline is not ready yet |
GONE | 410 | Retired path |
METHOD_NOT_ALLOWED | 405 | The path exists but does not support that HTTP method |
INTERNAL | 500 | Unexpected |
Handle INSUFFICIENT_CREDITS in this recipe.