Darnell Noel

Results 2 comments of Darnell Noel

I find using superRefine for these more complicated use cases to work well so far. Maybe try something like ``` z .object({ subscription: z.object(YourZodSchema).superRefine((val, ctx) => { if (val.type ===...

I've used below (rough example) to catch unhandled errors in my app router / middleware. Might be useful for someone. ``` const initMiddleware = async (req, _, next) => {...