{"record":{"id":"a70106aba911b1a7","repo":"transloadit/uppy","slug":"error-upload-id-required","errorCode":null,"errorMessage":"ERROR_UPLOAD_ID_REQUIRED","messagePattern":"ERROR_UPLOAD_ID_REQUIRED","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/@uppy/aws-s3/src/s3-client/S3mini.ts","lineNumber":385,"sourceCode":"          xhr.status,\n          serviceCode,\n          xhr.responseText,\n        )\n      }\n\n      throw err\n    }\n  }\n\n  /** Lists uploaded parts for a multipart upload. */\n  public override async listParts({\n    uploadId,\n    key,\n    signal,\n  }: IT.ListPartsParams): Promise<IT.UploadPart[]> {\n    this._checkKey(key)\n    if (!uploadId) {\n      throw new TypeError(C.ERROR_UPLOAD_ID_REQUIRED)\n    }\n    const { xhr } = await this.request({\n      request: { method: 'GET', key, uploadId },\n      signal,\n    })\n\n    const parsed = U.parseXml(xhr.responseText) as Record<string, unknown>\n    const result = (parsed.listPartsResult ||\n      parsed.ListPartsResult ||\n      parsed) as Record<string, unknown>\n\n    if (result && typeof result === 'object') {\n      const parts = result.Part || result.part || []\n      const partsArray = Array.isArray(parts) ? parts : [parts]\n\n      return partsArray\n        .filter(\n          (p): p is Record<string, unknown> =>","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/aws-s3/src/s3-client/S3mini.ts#L367-L403","documentation":"listParts() requires an uploadId because it lists the already-uploaded parts of a specific multipart upload. Passing a falsy uploadId throws a TypeError immediately before any network call.","triggerScenarios":"Calling s3Mini.listParts({ key, uploadId: undefined }) or with an empty string, e.g. when the uploadId from createMultipartUpload was lost or never awaited.","commonSituations":"Race where abort/complete runs before createMultipartUpload resolves; storing upload state incompletely; refactoring that drops the uploadId field.","solutions":["Ensure createMultipartUpload() has resolved and its uploadId is passed through","Persist { key, uploadId } together and pass both to listParts","Guard calls with a falsy check when uploadId may be absent"],"exampleFix":"// before\nawait s3Mini.listParts({ key, uploadId: state.uploadId })\n\n// after\nif (!state.uploadId) throw new Error('no active multipart upload')\nawait s3Mini.listParts({ key, uploadId: state.uploadId })","handlingStrategy":"validation","validationCode":"if (!uploadId) throw new TypeError('uploadId is required to list parts')","typeGuard":"const hasUploadId = (s: { uploadId?: string }): s is { uploadId: string } => Boolean(s.uploadId)","tryCatchPattern":"try { await listParts({ key, uploadId }) } catch (e) { if (e instanceof TypeError) handleMissingUploadId(); else throw e }","preventionTips":["Always await createMultipartUpload before part operations","Persist key+uploadId as a unit","Skip part ops when no upload is active"],"tags":["s3","multipart","validation","typescript"],"backgroundTag":"missing-required-parameter","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}