uppy
uppy copied to clipboard
Aws Multipart - Error handling for `prepareUploadParts`
Initial checklist
- [X] I understand this is a bug report and questions should be posted in the Community Forum
- [X] I searched issues and couldn’t find anything (or linked relevant results below)
Link to runnable example
No response
Steps to reproduce
I am currently working on Aws-S3-Multipart and I want to add custom retry functionality on my end.
To implement retry feature, I have added event listner on upload-error
event but callback is not being called if we get error in prepareUploadParts
function
In plugin, we have handled error-handling in #createUpload and #completeUpload functions but we have not added try catch block in #prepareUploadParts
function.
Suggested change https://github.com/transloadit/uppy/blob/main/packages/%40uppy/aws-s3-multipart/src/MultipartUploader.js#L203 we should add catch block here and invoke onError function in catch block similar to createUpload and completeUpload function
Expected behavior
We should add error handling for prepareUploadParts
function.
Actual behavior
We haven't supported error handling in prepareUploadParts
function
It indeed doesn't call this.#onError
, which would emit upload-error
. However, it does retry with the default or passed retryDelays
. So if you add custom retry logic, I suppose you should set it to zero retries otherwise it tries multiple times on something that won't work in your setup.
yeah @Murderlon it is not emitting upload-error
. about retryDelays
I want to pass retryDelays
as some custom values and after that retries, if upload fails then I want to do some custom logic.