mirror of
https://github.com/actions/toolkit.git
synced 2026-08-21 00:00:16 +02:00
use error in both reject and destroy
This commit is contained in:
@@ -79,10 +79,9 @@ export async function streamExtractExternal(
|
|||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const timerFn = (): void => {
|
const timerFn = (): void => {
|
||||||
response.message.destroy(
|
const timeoutError = new Error(`Blob storage chunk did not respond in ${timeout}ms`)
|
||||||
new Error(`Blob storage chunk did not respond in ${timeout}ms`)
|
response.message.destroy(timeoutError)
|
||||||
)
|
reject(timeoutError)
|
||||||
reject(`Blob storage chunk did not respond in ${timeout}ms`)
|
|
||||||
}
|
}
|
||||||
const timer = setTimeout(timerFn, timeout)
|
const timer = setTimeout(timerFn, timeout)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user