MediaFilez
DocumentationMEDIAFILEZ

Errors and status codes

Distinguish an HTTP failure from a failed background job.

HTTP errors

Error responses have this shape:

JSON
{
    "error": {
        "code": "JOB_CAPACITY_EXCEEDED",
        "message": "Too many pending downloads. Wait for a job to finish before retrying.",
        "requestId": "req_example"
    }
}
HTTP statusCommon codesAction
400VALIDATION_ERROR, BAD_REQUEST, BATCH_TOO_LARGEFix the request
401AUTH_REQUIRED, AUTH_INVALIDCheck the authentication method, key, and expiry
403ORIGIN_FORBIDDEN, LIMIT_EXCEEDED, SESSION_REQUIREDCheck browser origin, byte allowance, or required session type
404JOB_NOT_FOUND, FILE_NOT_FOUND, PLAYLIST_NOT_FOUNDCheck ID and owning account; inaccessible private resources are hidden
409IDEMPOTENCY_CONFLICT, JOB_NOT_CANCELLABLEResolve the conflict instead of blind retry
429RATE_LIMITED, JOB_CAPACITY_EXCEEDEDBack off or wait for capacity
500 / 503Service-dependentRetry a temporary outage with a bounded delay

The listed codes are common examples, not an exhaustive enumeration. Libraries may reject malformed bodies before application validation. Preserve requestId for support.

Background failure

A status lookup can return 200 for a job that failed:

JSON
{
    "job": {
        "id": "job_example",
        "status": "failed",
        "error": {
            "code": "WORKER_FAILED",
            "message": "The source could not be downloaded."
        },
        "result": null
    }
}

Inspect the job's status and error, not only response.ok. Do not request files from a failed job or turn a partial collection into a successful response.

Transport failures

A browser network error has no HTTP status visible to JavaScript. Check connectivity, timeout, and CORS. The website's generic connection message cannot identify the cause alone. See troubleshooting.