zomars
zomars
TtRPC
Created by zomars on 10/17/2023 in #❓-help
Is there a way to extract a procedure signature?
No description
13 replies
TtRPC
Created by zomars on 11/15/2022 in #❓-help
Zod Error Middleware
Hey lovely people. At Cal.com we make heavy use of zod for data validation. I was wondering if there's a way to create some kind of "error middleware" that can catch all Zod specific errors and serve the proper TRPC error back to the client. This would allow us to just use schema.parse instead of having to manually check schema.safeParse or having to use try/catch everywhere. Thanks for any input! 🙏
13 replies