• Formats a Zod parsing error into a human-readable string.

    The formatting is tailored to the Lens Protocol Metadata use case. It may not be suitable for other use cases.

    Parameters

    • zodError: ZodError<any>

    Returns string

    Example

    const result = PublicationMetadataSchema.safeParse(invalid);

    if (!result.success) {
    throw new Error(formatZodError(result.error));
    }