export type FrameworkRouteFailureKind = "network" | "http" | "malformed"; /** * A framework route that could not answer. `kind` separates an unreachable * server, a non-2xx response, and a 2xx body that is not the route's contract, * so a failed read can never be mistaken for an empty one. */ export declare class FrameworkRouteError extends Error { readonly route: string; readonly kind: FrameworkRouteFailureKind; readonly status: number | null; /** The server's own `error` text, when the response carried one. */ readonly serverMessage: string | null; /** The server's machine-readable `errorCode`, when the response carried one. */ readonly errorCode: string | null; constructor(input: { route: string; kind: FrameworkRouteFailureKind; message: string; status?: number | null; serverMessage?: string | null; errorCode?: string | null; cause?: unknown; }); } export declare function isFrameworkRouteError(value: unknown): value is FrameworkRouteError; export declare function isRecord(value: unknown): value is Record; export declare function malformedFrameworkRouteResponse(route: string, status: number, detail: string): FrameworkRouteError; /** * Fetch a framework route and return its parsed 2xx JSON body. Aborts rethrow * unchanged so callers can drop them; every other failure is a * `FrameworkRouteError`. */ export declare function requestFrameworkRouteJson(route: string, url: string, init?: RequestInit): Promise<{ status: number; body: unknown; }>;