Merge pull request #1721 from stackernews/fix-missing-usage-of-timeout-error
Fix missing usage of new TimeoutError
This commit is contained in:
commit
bf541aa643
|
@ -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