mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-21 17:29:43 +00:00
tus,xhr-upload: emit error when companion returns error during upload creation (#2166)
This commit is contained in:
parent
89c04b8516
commit
7d972e09a4
2 changed files with 5 additions and 1 deletions
|
|
@ -338,7 +338,8 @@ module.exports = class Tus extends Plugin {
|
|||
}).then(() => {
|
||||
resolve()
|
||||
}).catch((err) => {
|
||||
reject(new Error(err))
|
||||
this.uppy.emit('upload-error', file, err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -431,6 +431,9 @@ module.exports = class XHRUpload extends Plugin {
|
|||
|
||||
return () => socket.close()
|
||||
})
|
||||
}).catch((err) => {
|
||||
this.uppy.emit('upload-error', file, err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue