Describe the bug
My Tus server with its onUploadFinish hook will save a successful upload into the database and will wipe out the file locally. The thing is the user, on the frontend, may need to remove it from its list using:
uppy.removeFile(file.id);
But it triggers the error:
Uncaught (in promise) DetailedError: tus: unexpected response while terminating upload, originated from request (method: DELETE, url: http://localhost:3000/api/upload/9a029a4f-ddf0-46c5-a52d-c281e0ef2e2b, response code: 404, response text: The file for this url was not found
, request id: n/a)
Originally triggered from
|
throw new DetailedError( |
|
'tus: unexpected response while terminating upload', |
|
undefined, |
|
req, |
|
res, |
|
) |
.
The error 404 is part of the protocol so it's fine. I'm just here about the fact it's uncaught despite using Uppy listener on error event, and also using:
uppy.use(Tus, {
...
onError: (error) => {
console.log(error);
},
});
Nothing from tus-js-client (and @uppy/tus using same parameters) is catching it.
To Reproduce
Use an Uppy with Tus plugin, and trigger uppy.removeFile(id) that will call the terminate() from tus-js-client.
Describe the bug
My Tus server with its
onUploadFinishhook will save a successful upload into the database and will wipe out the file locally. The thing is the user, on the frontend, may need to remove it from its list using:But it triggers the error:
Originally triggered from
tus-js-client/lib/upload.ts
Lines 1199 to 1204 in fe0cf9e
The error 404 is part of the protocol so it's fine. I'm just here about the fact it's uncaught despite using Uppy listener on
errorevent, and also using:Nothing from
tus-js-client(and@uppy/tususing same parameters) is catching it.To Reproduce
Use an Uppy with Tus plugin, and trigger
uppy.removeFile(id)that will call theterminate()fromtus-js-client.