{"record":{"id":"919ebaa42fa5485c","repo":"transloadit/uppy","slug":"transloadit-the-params-option-is-required","errorCode":null,"errorMessage":"Transloadit: The `params` option is required.","messagePattern":"Transloadit: The `params` option is required\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/transloadit/src/index.ts","lineNumber":175,"sourceCode":"    transloadit?: { assembly: string }\n    tus?: TusOpts<M, B>\n  }\n  export interface RemoteUppyFile<M extends Meta, B extends Body> {\n    transloadit?: { assembly: string }\n    tus?: TusOpts<M, B>\n  }\n}\n\nconst sendErrorToConsole = (originalErr: Error) => (err: Error) => {\n  const error = new ErrorWithCause('Failed to send error to the client', {\n    cause: err,\n  })\n  console.error(error, originalErr)\n}\n\nfunction validateParams(params?: AssemblyOptions['params']): void {\n  if (params == null) {\n    throw new Error('Transloadit: The `params` option is required.')\n  }\n\n  let parsed: AssemblyParameters\n  if (typeof params === 'string') {\n    try {\n      parsed = JSON.parse(params) as AssemblyParameters\n    } catch (err) {\n      // Tell the user that this is not an Uppy bug!\n      throw new ErrorWithCause(\n        'Transloadit: The `params` option is a malformed JSON string.',\n        { cause: err },\n      )\n    }\n  } else {\n    parsed = params\n  }\n\n  if (!parsed.auth?.key) {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/transloadit/src/index.ts#L157-L193","documentation":"validateParams throws when the Transloadit plugin's params option is entirely absent (null or undefined). 'params' carries the Assembly instructions (steps/templates) and auth key, so without it there is nothing to submit to Transloadit; the plugin fails fast during #prepareUpload (on upload-start) rather than sending an empty Assembly.","triggerScenarios":"new Transloadit(uppy, {}) or { params: null } (or getAssemblyOptions returning no params), then calling uppy.upload(). #prepareUpload -> validateParams sees params == null and throws.","commonSituations":"Config built dynamically and the params assignment silently skipped; using assembly options fetched asynchronously that resolve to undefined; migrating from an older API where params was optional in some code paths; typo like Params or params nested one level too deep.","solutions":["Provide params in the plugin options: params: { auth: { key }, steps: {...} } or a template_ids form","If params are computed per-upload, use getAssemblyOptions to return them per file/batch","Check for typos/casing in the option name (params, not Params/param)","Fail your config loading loudly if the template/params source is empty"],"exampleFix":"// before\nuppy.use(Transloadit, { waitForEncoding: true }) // no params\nawait uppy.upload() // throws\n\n// after\nuppy.use(Transloadit, {\n  params: {\n    auth: { key: TRANSLOADIT_KEY },\n    template_id: 'my-template',\n  },\n})","handlingStrategy":"validation","validationCode":"if (assemblyParams == null) {\n  throw new Error('Transloadit params missing — check config')\n}\nuppy.use(Transloadit, { params: assemblyParams })","typeGuard":"function hasParams(o: unknown): o is { params: Record<string, unknown> } {\n  return typeof o === 'object' && o !== null && (o as any).params != null\n}","tryCatchPattern":"try { await uppy.upload() }\ncatch (err) { if (/params.*option is required/.test(err.message)) fixTransloaditConfig() }","preventionTips":["Assert config completeness at boot, not at upload time","Use getAssemblyOptions for dynamic params and fail fetches loudly"],"tags":["transloadit","config","params","missing-option"],"backgroundTag":"missing-required-option","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}