astro-ghostcms/.pnpm-store/v3/files/b2/b34c413d2e506d04b5465fecb57...

18 lines
433 B
Plaintext

import { RequestError } from '../core/errors.js';
/**
An error to be thrown when the request is aborted with `.cancel()`.
*/
export class CancelError extends RequestError {
constructor(request) {
super('Promise was canceled', {}, request);
this.name = 'CancelError';
this.code = 'ERR_CANCELED';
}
/**
Whether the promise is canceled.
*/
get isCanceled() {
return true;
}
}