diff --git a/lib/time.js b/lib/time.js index 2f3c6c30..2ccd0390 100644 --- a/lib/time.js +++ b/lib/time.js @@ -140,7 +140,7 @@ function timeoutPromise (timeout) { // if no timeout is specified, never settle if (!timeout) return - setTimeout(() => reject(new Error(`timeout after ${timeout / 1000}s`)), timeout) + setTimeout(() => reject(new TimeoutError(timeout)), timeout) }) }