import { Context } from 'hono';
import { RequestIdVariables } from 'hono/request-id';
import { Bindings, HTTPResponseError } from 'hono/types';

type Env = {
    Variables: RequestIdVariables;
    Bindings?: Bindings;
};
type AxiosError = {
    code?: string;
    cause?: unknown;
    status?: number;
    message?: string;
    isAxiosError: boolean;
    response?: {
        data: unknown;
        status: number;
        statusText: string;
        headers: Record<string, string>;
    };
    config?: {
        url?: string;
        data?: unknown;
        method?: string;
        headers?: Record<string, string>;
    };
};
declare function isAxiosError(payload: unknown): payload is AxiosError;
declare function errorHandler<E extends Env = never>(error: Error | HTTPResponseError, c: Context<E>): Response | Promise<Response>;

export { type Env, errorHandler, isAxiosError };
