import { StatusError } from "../error/status.mjs"; import { Context } from "hono"; import { RequestIdVariables } from "hono/request-id"; import { Bindings, HTTPResponseError } from "hono/types"; //#region src/hono/handler.d.ts 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; }; config?: { url?: string; data?: unknown; method?: string; headers?: Record; }; }; declare function isAxiosError(payload: unknown): payload is AxiosError; /** * `instanceof` alone is not enough: two copies of this package (duplicated in a lockfile, or one * bundled into a dependency) produce distinct classes, and `Status.adapter` may swap in a * host-defined error class entirely. Fall back to recognizing the error by shape. */ declare function isStatusError(payload: unknown): payload is StatusError; declare function errorHandler(error: Error | HTTPResponseError, c: Context): Response | Promise; //#endregion export { Env, errorHandler, isAxiosError, isStatusError }; //# sourceMappingURL=handler.d.mts.map