Merge pull request #2124 from akashchi/reject-on-download-failure

[ARTIFACT] Reject download promise if timeout was reached
This commit is contained in:
Daniel Kennedy
2025-09-25 09:06:20 -04:00
committed by GitHub
@@ -79,9 +79,11 @@ export async function streamExtractExternal(
return new Promise((resolve, reject) => {
const timerFn = (): void => {
response.message.destroy(
new Error(`Blob storage chunk did not respond in ${timeout}ms`)
const timeoutError = new Error(
`Blob storage chunk did not respond in ${timeout}ms`
)
response.message.destroy(timeoutError)
reject(timeoutError)
}
const timer = setTimeout(timerFn, timeout)