MCPcopy Create free account
hub / github.com/node-modules/utility / TimeoutError

Class TimeoutError

src/timeout.ts:1–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export class TimeoutError extends Error {
2 timeout: number;
3
4 constructor(timeout: number) {
5 super(`Timed out after ${timeout}ms`);
6 this.name = this.constructor.name;
7 this.timeout = timeout;
8 Error.captureStackTrace(this, this.constructor);
9 }
10}
11
12// https://betterstack.com/community/guides/scaling-nodejs/nodejs-timeouts/
13export async function promiseTimeout<T>(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…