You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Problem
When using fastify-type-provider-typebox, union type validation failures provide minimal error details:
{message: 'Expected union value',instancePath: ''}
This lacks the detailed validation information that TypeBox provides through its errors property in the ValueError interface, making it difficult for developers to debug union-type validation failures.
exportinterfaceValueError{type: ValueErrorType;schema: TSchema;path: string;value: unknown;message: string;errors: ValueErrorIterator[];// Contains detailed validation results for each union member}
Current error mapping in fastify-type-provider-typebox:
Prerequisites
🚀 Feature Proposal
Problem
When using
fastify-type-provider-typebox
, union type validation failures provide minimal error details:This lacks the detailed validation information that TypeBox provides through its
errors
property in theValueError
interface, making it difficult for developers to debug union-type validation failures.Background
TypeBox's
ValueError
interface contains rich error information:Current error mapping in
fastify-type-provider-typebox
:Proposal
Enhance the error mapping to include detailed union validation information:
Example Output
I understand we need to stick to FastifySchemaValidationError. I'm raising this here to discuss how to better support it.
Motivation
No response
Example
No response
The text was updated successfully, but these errors were encountered: