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.
const result = PostMetadataSchema.safeParse(invalid);if (!result.success) { throw new Error(formatZodError(result.error));} Copy
const result = PostMetadataSchema.safeParse(invalid);if (!result.success) { throw new Error(formatZodError(result.error));}
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.