Skip to content

Commit 2b5e682

Browse files
alexforsythtrivikr
andauthored
fix: calling abort should throw abort error from upload
Co-authored-by: Trivikram Kamat <[email protected]>
1 parent e0ea40d commit 2b5e682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/storage/src/Upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export class Upload extends EventEmitter {
154154
// Create and start concurrent uploads.
155155
await Promise.all(this.concurrentUploaders);
156156
if (this.abortController.signal.aborted) {
157-
return {} as ServiceOutputTypes;
157+
throw Object.assign(new Error("Upload aborted."), { name: "AbortError" });
158158
}
159159

160160
this.uploadedParts.sort((a, b) => a.PartNumber! - b.PartNumber!);

0 commit comments

Comments
 (0)