export const OCC_ABORTED = 'OCC_ABORTED';
export const OCC_INVALID_INPUT = 'OCC_INVALID_INPUT';
export class OccAbortError extends Error {
    code = OCC_ABORTED;
    constructor(message = 'The operation was aborted.') {
        super(message);
        this.name = 'AbortError';
    }
}
export function isOccAbortError(error) {
    return (error instanceof OccAbortError ||
        (error instanceof Error && (error.name === 'AbortError' || error.code === OCC_ABORTED)));
}
/** A caller-controlled value failed domain validation after the transport boundary. */
export class InvalidInputError extends Error {
    code = OCC_INVALID_INPUT;
    constructor(message, options) {
        super(message, options);
        this.name = 'InvalidInputError';
    }
}
export function isInvalidInputError(error) {
    return (error instanceof InvalidInputError ||
        (error instanceof Error && error.code === OCC_INVALID_INPUT));
}
//# sourceMappingURL=errors.js.map