Bug description: If a route's handle method throws a ZodError that's not coming from validateRequest, chanfana erroneously returns 400 to the user, also exposing the route's internal implementation details in the response body.
Desired behavior: only errors thrown from getValidatedData are assumed to be a user request validation error.
Bug description: If a route's
handle
method throws aZodError
that's not coming fromvalidateRequest
, chanfana erroneously returns 400 to the user, also exposing the route's internal implementation details in the response body.Desired behavior: only errors thrown from
getValidatedData
are assumed to be a user request validation error.Example:
for all valid requests will always return
400 Bad Request