export class OutOfCreditsError extends Error {
    constructor(message = 'You are out of credits. Please upgrade your plan to send more messages.') {
        super(message);
        this.name = 'OutOfCreditsError';
    }
}
export function isOutOfCreditsError(error) {
    return (error instanceof OutOfCreditsError ||
        (error instanceof Error &&
            (error.name === OutOfCreditsError.name ||
                error.message.toLowerCase().includes('out of credits'))));
}
//# sourceMappingURL=out-of-credits-error.js.map