/**
 * Error hierarchy used throughout the library.
 *
 * - {@link BaseError}      — root class; all custom errors extend it.
 * - {@link FatalError}     — code `EFATAL`; non-recoverable problem (network, programmer mistake, etc.).
 * - {@link ParseError}     — code `EPARSE`; the response from Telegram could not be parsed.
 * - {@link TelegramError}  — code `ETELEGRAM`; the Bot API returned `ok: false`.
 */
export interface TelegramErrorResponse {
    status?: number;
    body?: unknown;
    headers?: Record<string, string>;
    /** Underlying response object (Response or http.IncomingMessage) when available. */
    raw?: unknown;
}
export declare class BaseError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
    toJSON(): {
        code: string;
        message: string;
    };
}
export declare class FatalError extends BaseError {
    readonly cause?: Error;
    constructor(data: string | Error);
}
export declare class ParseError extends BaseError {
    readonly response?: TelegramErrorResponse;
    constructor(message: string, response?: TelegramErrorResponse);
}
export declare class TelegramError extends BaseError {
    readonly response?: TelegramErrorResponse;
    constructor(message: string, response?: TelegramErrorResponse);
}
export declare const errors: {
    readonly BaseError: typeof BaseError;
    readonly FatalError: typeof FatalError;
    readonly ParseError: typeof ParseError;
    readonly TelegramError: typeof TelegramError;
};
export type Errors = typeof errors;
//# sourceMappingURL=errors.d.ts.map