/** * Error thrown by `CorePikkuFetch` for any non-2xx response. * * Pikku serializes a typed server error as a JSON body of the shape * `{ name, message }`. This class decodes that body so the thrown value is a * real `Error` — `error.message` is the server's message (not `[object * Response]`), `error.name` is the server error's name (e.g. `ConflictError`), * and `error.status` is the HTTP status. The original `Response` is kept on * `error.response` for consumers that need headers or the raw body. */ export declare class PikkuFetchError extends Error { readonly status: number; readonly statusText: string; readonly response: Response; readonly body: unknown; constructor(response: Response, body: unknown, message: string, name: string); /** * Builds a `PikkuFetchError` from a non-2xx `Response`, decoding the typed * error body when present. Reads from a clone so `response.body` stays * consumable by callers that reach for it. */ static fromResponse(response: Response): Promise; }