isAbortError
isAbortError(
error):boolean
Defined in: src/AbortError.ts:29
True for every way an aborted operation fails: this library’s AbortError, and any error
named AbortError or TimeoutError (the DOMExceptions that fetch, AbortSignal.timeout,
abortAfter and throwIfAborted produce).
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
Example
Section titled “Example”try { await fetch(url, { signal: controller.signal });} catch (error) { if (isAbortError(error)) return; // cancelled or timed out throw error;}