Open wolverian opened 4 months ago
Looking at Fastify's documentation, I found this: https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/#schemaerrorformatter
However, I can't get Fastify to call my custom schema error formatter:
.setSchemaErrorFormatter( (errors: FastifySchemaValidationError[], dataVar: SchemaErrorDataVar) => generateError(errors.map((err) => err.message)), // generateErrors is from zod-error )
Is this supposed to work or am I misunderstanding what a schema error formatter is?
Looking at Fastify's documentation, I found this: https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/#schemaerrorformatter
However, I can't get Fastify to call my custom schema error formatter:
Is this supposed to work or am I misunderstanding what a schema error formatter is?