1
0
Fork 0

update error handling abort

vmjoseph/download-v4-client-blob
srryan 2023-12-19 12:46:58 -05:00
parent c119fcd773
commit 78ed49ff88
1 changed files with 4 additions and 3 deletions

View File

@ -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)
})
}