{"record":{"id":"ff191a6253b4db57","repo":"transloadit/uppy","slug":"transloadit-assembly-status-is-missing-assembly","errorCode":null,"errorMessage":"Transloadit: Assembly status is missing `assembly_id`.","messagePattern":"Transloadit: Assembly status is missing `assembly_id`\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/transloadit/src/index.ts","lineNumber":204,"sourceCode":"        { cause: err },\n      )\n    }\n  } else {\n    parsed = params\n  }\n\n  if (!parsed.auth?.key) {\n    throw new Error(\n      'Transloadit: The `params.auth.key` option is required. ' +\n        'You can find your Transloadit API key at https://transloadit.com/c/template-credentials',\n    )\n  }\n}\n\nfunction ensureAssemblyId(status: AssemblyResponse): string {\n  if (!status.assembly_id) {\n    console.warn('Assembly status is missing `assembly_id`.', status)\n    throw new Error('Transloadit: Assembly status is missing `assembly_id`.')\n  }\n  return status.assembly_id\n}\n\nfunction ensureUrl(\n  label: string,\n  ...candidates: Array<string | undefined>\n): string {\n  for (const value of candidates) {\n    if (typeof value === 'string' && value.length > 0) {\n      return value\n    }\n  }\n  throw new Error(`Transloadit: Assembly status is missing ${label}.`)\n}\n\nexport function getAssemblyUrl(\n  assembly: Pick<AssemblyResponse, 'assembly_ssl_url' | 'assembly_url'>,","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/transloadit/src/index.ts#L186-L222","documentation":"ensureAssemblyId throws when an Assembly status response from Transloadit lacks assembly_id. The plugin first logs a console.warn with the full status payload, then throws — meaning the Transloadit API answered with something unexpected (error payload, rate-limit body, or an API version mismatch) instead of a proper Assembly status.","triggerScenarios":"Any Assembly status fetch/create where the JSON body has no assembly_id field: #prepareUpload creating an assembly, restoreAssemblies on boot, or the socket/polling update paths calling ensureAssemblyId. Typical when Transloadit returns an error object ('error': 'RATE_LIMIT_REACHED', invalid template, account suspended) with HTTP 200-level or followed by json without id.","commonSituations":"Transloadit account out of credits or rate-limited; a template_id that doesn't exist under that auth key; API response shape changed (old @uppy/transloadit against a newer/older backend); signing clock skew producing accepted-but-error bodies.","solutions":["Look at the console.warn output right before the throw — it contains the actual Transloadit response explaining the failure (e.g. RATE_LIMIT_REACHED, INVALID_TEMPLATE_ID)","Verify your Transloadit account status/credits and rate limits","Confirm the template_id exists for the auth key used","Upgrade @uppy/transloadit (and Companion if involved) to the latest version to match the current Assembly API shape"],"exampleFix":"// before\nuppy.use(Transloadit, { params: { auth: { key: 'k' }, template_id: 'does-not-exist' } })\nawait uppy.upload()\n// console.warn shows { error: 'INVALID_TEMPLATE_ID' ... } then throws\n\n// after\nuppy.use(Transloadit, {\n  params: { auth: { key: 'k' }, template_id: 'valid-template-id' },\n})","handlingStrategy":"try-catch","validationCode":"// Before upload, sanity-check the template resolves\nconst resp = await fetch('https://api2.transloadit.com/templates/my-template-id', {\n  headers: { 'Transloadit-Key': key },\n})\nif (!resp.ok) throw new Error('Template or account problem — inspect response')","typeGuard":"function isAssemblyIdError(e: unknown): boolean {\n  return e instanceof Error && /missing `assembly_id`/.test(e.message)\n}","tryCatchPattern":"try { await uppy.upload() }\ncatch (err) {\n  if (isAssemblyIdError(err)) {\n    // the console.warn printed just before contains the true cause\n    uppy.info('Processing service rejected the request. Check console & account status.', 'error', 5000)\n  }\n}","preventionTips":["Always read the console.warn payload — it contains Transloadit's real error (rate limit, invalid template, account issue)","Keep the @uppy/transloadit version in sync with the Transloadit API","Monitor account credits and rate limits","Verify template_ids exist for the configured auth key"],"tags":["transloadit","assembly","api-response","rate-limit"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}