瀏覽代碼

@uppy/aws-s3-multipart: fix lint warning (#4569)

Antoine du Hamel 1 年之前
父節點
當前提交
8f63df3d63
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/@uppy/aws-s3-multipart/src/index.js

+ 4 - 1
packages/@uppy/aws-s3-multipart/src/index.js

@@ -265,7 +265,10 @@ class HTTPCommunicationQueue {
       return await this.#sendCompletionRequest(file, { key, uploadId, parts, signal }).abortOn(signal)
     } catch (err) {
       if (err?.cause !== pausingUploadReason && err?.name !== 'AbortError') {
-        this.abortFileUpload(file).catch(console.warn)
+        // We purposefully don't wait for the promise and ignore its status,
+        // because we want the error `err` to bubble up ASAP to report it to the
+        // user. A failure to abort is not that big of a deal anyway.
+        this.abortFileUpload(file)
       }
       throw err
     }