react-native-compressor icon indicating copy to clipboard operation
react-native-compressor copied to clipboard

Cancel Upload Throws Error: [Error: Upload Failed]

Open kusche12 opened this issue 1 year ago • 0 comments

Current behavior

I have the backgroundUpload() in a try/catch block. When calling cancelUpload(uploadId), the catch block runs with the error "[Error: Upload Failed]".

Expected behavior

This is not an error, so I don't think it should be calling the catch block on cancel. However, if it is considered an error, then it would be better to have an updated error message so we can filter out the canceled uploads from the actual error uploads.

Platform

  • [X] Android
  • [X] iOS

React Native Version

0.70.5

React Native Compressor Version

1.8.23

Reproducible Steps And Demo

  1. Call backgroundUpload() in a try/catch block and get the uploadId
  2. Then call cancelUpload(uploadId)
  3. Notice that backgroundUpload is caught in the catch block with an error

kusche12 avatar Jan 26 '24 21:01 kusche12