{"record":{"id":"c589a6e060f07448","repo":"transloadit/uppy","slug":"unknown-multipart-upload-error","errorCode":null,"errorMessage":"Unknown multipart upload error","messagePattern":"Unknown multipart upload error","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/companion/src/server/Uploader.ts","lineNumber":880,"sourceCode":"      const errObj = isRecord(err) ? err : null\n      const response =\n        errObj && isRecord(errObj['response']) ? errObj['response'] : null\n      const statusCode =\n        response && typeof response['statusCode'] === 'number'\n          ? response['statusCode']\n          : undefined\n\n      if (statusCode != null) {\n        const statusMessage =\n          typeof errObj?.['statusMessage'] === 'string'\n            ? errObj['statusMessage']\n            : 'Request failed'\n        throw Object.assign(new Error(statusMessage), {\n          extraData: getRespObj(response as unknown as Response<string>),\n        })\n      }\n\n      throw new Error('Unknown multipart upload error', { cause: err })\n    }\n  }\n\n  /**\n   * Upload the file to S3 using a Multipart upload.\n   */\n  async #uploadS3Multipart(\n    stream: NodeReadableStream,\n    req: Request,\n  ): Promise<UploadResult> {\n    if (!this.options.s3) {\n      throw new Error(\n        'The S3 client is not configured on this companion instance.',\n      )\n    }\n\n    const filename = this.uploadFileName\n    const s3Options = this.options.s3","sourceCodeStart":862,"sourceCodeEnd":898,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/companion/src/server/Uploader.ts#L862-L898","documentation":"Fallback error inside the multipart upload try/catch: if the got request failed and the error/response could not be classified (no response body or status message available), Companion throws 'Unknown multipart upload error' with the original error attached as `cause` for diagnostics.","triggerScenarios":"got throws a non-HTTP error (DNS failure, socket hang-up, TLS error) or a response with no usable status/body, so the handler cannot build a specific statusMessage and falls through to the generic throw.","commonSituations":"Destination endpoint unreachable, certificate errors, connection resets, or unexpected response shapes from a custom upload receiver.","solutions":["Inspect err.cause on the caught error to find the underlying network/HTTP failure","Verify the destination endpoint is reachable from the Companion server (DNS, TLS, firewall)","Fix or harden the receiving endpoint based on what cause reveals, then retry"],"exampleFix":"// before\ncatch (err) { console.log(err.message) } // 'Unknown multipart upload error'\n\n// after\ncatch (err) { console.log(err.message, err.cause) } // reveals e.g. ECONNREFUSED, then fix endpoint/firewall","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await uploader.upload() } catch (err) {\n  if (err.message === 'Unknown multipart upload error') {\n    console.error('cause:', err.cause)\n    throw err.cause ?? err // surface the real network/HTTP failure\n  }\n  throw err\n}","preventionTips":["Always inspect err.cause for this error","Monitor Companion logs for destination endpoint reachability","Pre-flight check the destination URL with a HEAD request"],"tags":["companion","uploader","multipart","network","diagnostics"],"backgroundTag":"opaque-wrapped-network-error","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}