Whatever was thrown or rejected with
true when the value is an Error named AbortError
isAbortError(new DOMException('stop', 'AbortError')); // true
isAbortError('user_aborted'); // false (see isExpectedAbort)
export function isAbortError(error: unknown): boolean {
return error instanceof Error && error.name === 'AbortError';
}
True for an
AbortError, the error a cancelledfetchrejects with. A user stop or a search-budget timeout is expected and must not be treated as a supplier failure.