react-native-compressor
react-native-compressor copied to clipboard
Cancel Upload Throws Error: [Error: Upload Failed]
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
- Call backgroundUpload() in a try/catch block and get the uploadId
- Then call cancelUpload(uploadId)
- Notice that backgroundUpload is caught in the catch block with an error