UNPKG

@whatwg-node/node-fetch

Version:

Fetch API implementation for Node

16 lines (15 loc) 360 B
export class PonyfillAbortError extends Error { constructor(reason) { let message = 'The operation was aborted'; if (reason) { message += ` reason: ${reason}`; } super(message, { cause: reason, }); this.name = 'AbortError'; } get reason() { return this.cause; } }