Skip to content

Commit

Permalink
@uppy/aws-s3-multipart: ignore exception inside abortMultipartUpload (
Browse files Browse the repository at this point in the history
#3950)

The docs say "Cancellation cannot fail in Uppy, so the result of this
function is ignored". So let's ignore it indeed.
  • Loading branch information
aduh95 committed Aug 4, 2022
1 parent 65f2551 commit 28f56e1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/@uppy/aws-s3-multipart/src/MultipartUploader.js
Expand Up @@ -415,12 +415,10 @@ class MultipartUploader {
#abortUpload () {
this.abortController.abort()

this.createdPromise.then(() => {
this.options.abortMultipartUpload({
key: this.key,
uploadId: this.uploadId,
})
}, () => {
this.createdPromise.then(() => this.options.abortMultipartUpload({
key: this.key,
uploadId: this.uploadId,
})).catch(() => {
// if the creation failed we do not need to abort
})
}
Expand Down

0 comments on commit 28f56e1

Please sign in to comment.