zod-express-middleware
zod-express-middleware copied to clipboard
Unable to catch errors in express middleware
Description
When a validation fails, the library does this:
res.status(400).send(...)
When it should actually do this:
throw new ZodError(...)
If not, there's no way of parsing the errors to match different needs.