T
tRPC

Make tRPC return Bad Request on Zod validation error?

Make tRPC return Bad Request on Zod validation error?

AApteryx7/19/2023
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?
Bbostonsheraff7/19/2023
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?

Looking for more? Join the community!

T
tRPC

Make tRPC return Bad Request on Zod validation error?

Join Server