{"record":{"id":"2f6ee910d549c226","repo":"transloadit/uppy","slug":"no-uploadid-returned","errorCode":null,"errorMessage":"No uploadId returned","messagePattern":"No uploadId returned","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/@uppy/aws-s3/src/s3-client/CompanionS3.ts","lineNumber":112,"sourceCode":"  }: IT.CreateMultipartUploadParams) {\n    if (typeof fileType !== 'string') {\n      throw new TypeError(`${C.ERROR_PREFIX}fileType must be a string`)\n    }\n\n    const method = 'POST'\n    const response = await this._fetch('/multipart', {\n      method,\n      body: JSON.stringify({ filename: keyIn, metadata, type: fileType }),\n      headers: { 'content-type': 'application/json' },\n      signal,\n    })\n    const {\n      key,\n      uploadId,\n    }: { key?: string; uploadId?: string; bucket?: string } =\n      await response.json()\n\n    if (uploadId == null) throw new Error('No uploadId returned')\n    if (key == null) throw new Error('No key returned')\n\n    return { uploadId, key }\n  }\n\n  public override async uploadPart({\n    key,\n    uploadId,\n    data,\n    partNumber,\n    onProgress,\n    signal,\n  }: IT.UploadPartParams) {\n    const response = await this._fetch(\n      `/multipart/${encodeURIComponent(uploadId)}/${encodeURIComponent(partNumber)}?${new URLSearchParams({ key })}`,\n      {\n        method: 'GET',\n        signal,","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/aws-s3/src/s3-client/CompanionS3.ts#L94-L130","documentation":"The preauth endpoint expects a JSON body containing a `params` property. If the body is not an object or lacks `params`, Companion logs 'invalid request data received' and returns 400 without issuing a pre-auth token.","triggerScenarios":"POSTing to /:providerName/preauth with an empty body, form-encoded body, or a JSON body missing the params key (e.g. sending credentials directly instead of nested under params).","commonSituations":"Client sends { apiKey: 'x' } instead of { params: { apiKey: 'x' } }; missing Content-Type: application/json so req.body is not parsed; older client versions using a different payload shape.","solutions":["Send a JSON body with the data nested under `params`","Set the Content-Type: application/json header","Validate the payload shape before sending"],"exampleFix":"// before\nawait fetch('/companion/url/preauth', { method: 'POST', body: JSON.stringify({ apiKey: 'x' }) })\n// after\nawait fetch('/companion/url/preauth', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ params: { apiKey: 'x' } }),\n})","handlingStrategy":"validation","validationCode":"const payload = { params: { apiKey: 'x' } }\nif (!('params' in payload)) throw new Error('params required')\nawait fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) })","typeGuard":"const isPreauthBody = (b: unknown): b is { params: Record<string, unknown> } =>\n  typeof b === 'object' && b !== null && 'params' in b","tryCatchPattern":null,"preventionTips":["Always set Content-Type: application/json for JSON APIs","Wrap preauth data under `params`","Add contract tests for request body shapes"],"tags":["companion","preauth","http-400","request-body"],"backgroundTag":"request-body-validation-failed","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}