Make tRPC return Bad Request on Zod validation error?
As the title says, how can I make tRPC return a proper error message, like a Bad Request, when there is a Zod validation error?
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1131216800055566477/image.png)
1 Reply
so the error we're seeing here is because the client inputs aren't passing the input validation with zod and you'd prefer a 4xx error instead of 5xx?