{"record":{"id":"378c9c20c3429fe1","repo":"transloadit/uppy","slug":"transloadit-assembly-status-is-missing-label","errorCode":null,"errorMessage":"Transloadit: Assembly status is missing ${label}.","messagePattern":"Transloadit: Assembly status is missing (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/transloadit/src/index.ts","lineNumber":218,"sourceCode":"\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'>,\n): string {\n  return ensureUrl(\n    '`assembly_url`',\n    assembly.assembly_url,\n    assembly.assembly_ssl_url,\n  )\n}\n\nexport function getAssemblyUrlSsl(\n  assembly: Pick<AssemblyResponse, 'assembly_ssl_url' | 'assembly_url'>,\n): string {\n  return ensureUrl(\n    '`assembly_ssl_url`',\n    assembly.assembly_ssl_url,","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/transloadit/src/index.ts#L200-L236","documentation":"Thrown by ensureUrl when none of the expected URL fields on the Transloadit Assembly status response contain a non-empty string. This means the assembly object returned by Transloadit's API lacks both assembly_url and assembly_ssl_url. It usually indicates an unexpected or malformed Assembly status payload rather than a client configuration problem.","triggerScenarios":"Calling getAssemblyUrl/getAssemblyUrlSsl/tusEndpoint with an AssemblyResponse object where both assembly_ssl_url and assembly_url are undefined, empty, or missing — e.g. a truncated or error-shaped response from Transloadit was treated as a valid assembly status.","commonSituations":"Transloadit API changed its response shape, a proxy/Companion stripped fields, rate-limit or auth error responses being parsed as assembly status, or mocked/stubbed assembly objects in tests missing URL fields.","solutions":["Log and inspect the full assembly status object you received to see which fields are present and whether it is actually an error payload","Check for and surface any preceding error (auth failure, rate limit) from the createAssembly / status fetch that produced this object","Upgrade @uppy/transloadit and @uppy/companion to the latest versions in case of API response-shape changes","If mocking assemblies in tests, include non-empty assembly_url and assembly_ssl_url"],"exampleFix":"// before\nconst url = getAssemblyUrl(assembly) // throws if both URL fields empty\n// after\nif (!assembly.assembly_url && !assembly.assembly_ssl_url) {\n  throw new Error(`Unexpected assembly status: ${JSON.stringify(assembly)}`)\n}\nconst url = getAssemblyUrl(assembly)","handlingStrategy":"validation","validationCode":"function hasAssemblyUrl(a: unknown): a is { assembly_url: string } {\n  return typeof (a as any)?.assembly_url === 'string' && (a as any).assembly_url.length > 0\n    || typeof (a as any)?.assembly_ssl_url === 'string' && (a as any).assembly_ssl_url.length > 0\n}","typeGuard":"const hasAssemblyUrl = (a: unknown): a is Record<'assembly_url' | 'assembly_ssl_url', string> =>\n  ['assembly_url', 'assembly_ssl_url'].some((k) => typeof (a as any)?.[k] === 'string' && (a as any)[k].length > 0)","tryCatchPattern":null,"preventionTips":["Log full assembly status responses in development","Pin @uppy/transloadit to tested versions","When mocking assemblies in tests, always include URL fields"],"tags":["transloadit","assembly","url","api-response"],"backgroundTag":"api-response-schema-mismatch","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}