/** * Error thrown when a server function call fails. * Available on both client and server. */ export declare class ServerFunctionError extends Error { /** The unique function ID. */ readonly fnId: string; /** HTTP status code from the server. */ readonly status: number; /** Structured error data from the server (if any). */ readonly data?: unknown; constructor(message: string, fnId: string, status: number, options?: { cause?: Error; data?: unknown; }); } /** * Throwable error for server functions to return structured error data. * * @example * ```ts * export async function getUser(id: string) { * const user = db.find(id); * if (!user) throw new ServerError("User not found", { status: 404, data: { id } }); * return user; * } * ``` */ export declare class ServerError extends Error { readonly status: number; readonly data?: unknown; constructor(message: string, options?: { status?: number; data?: unknown; }); } //# sourceMappingURL=errors.d.ts.map