Use new TimeoutError
This commit is contained in:
parent
adfbdeddba
commit
06a3a71eb9
|
@ -140,7 +140,7 @@ function timeoutPromise (timeout) {
|
||||||
// if no timeout is specified, never settle
|
// if no timeout is specified, never settle
|
||||||
if (!timeout) return
|
if (!timeout) return
|
||||||
|
|
||||||
setTimeout(() => reject(new Error(`timeout after ${timeout / 1000}s`)), timeout)
|
setTimeout(() => reject(new TimeoutError(timeout)), timeout)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue