/**
 * Duck-typed interface for ZodError-like objects (works with both Zod v3 and v4)
 * Note: Zod v4 uses PropertyKey[] (string | number | symbol) for path
 */
interface ZodErrorLike {
    issues: Array<{
        path: PropertyKey[];
        message: string;
    }>;
}
/**
 * Formats a ZodError into a structured validation error response.
 * Returns an object with an error message and an array of field-specific issues.
 * Accepts both Zod v3 and v4 ZodError objects via duck typing.
 */
export declare function formatZodError(error: ZodErrorLike, context: string): {
    error: string;
    issues: Array<{
        field: string;
        message: string;
    }>;
};
export declare function handleError(error: unknown, defaultMessage: string): never;
export {};
//# sourceMappingURL=error.d.ts.map