update error handling abort
This commit is contained in:
1 parent
6d17c7d307
commit
177ac5eb58
1 file changed
+4
-3
@@ -50,10 +50,11 @@ async function streamExtract(url: string, directory: string): Promise<void> {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
response.readableStreamBody
|
||||
?.pipe(unzip.Extract({path: directory}))
|
||||
.on('close', resolve)
|
||||
.on('error', reject)
|
||||
?.on('error', reject)
|
||||
.on('aborted', reject)
|
||||
.pipe(unzip.Extract({path: directory}))
|
||||
.on('error', reject)
|
||||
.on('close', resolve)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user