Apteryx
Apteryx2y ago

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?
1 Reply
bostonsheraff
bostonsheraff2y ago
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?

Did you find this page helpful?