shounakkay
shounakkay
TTCTheo's Typesafe Cult
Created by shounakkay on 12/28/2023 in #questions
Mutations on the trpc functions is throwing ["ERR_INTERNAL_ASSERTION"], queries are working fine.
Hey y'all, export const userRouter = createTRPCRouter({ registerUser: publicProcedure .input(z.object({email: z.string(), password: z.string(), confirmPassword: z.string()})) .mutation(async (opts) => { const {input, ctx: {db}} = opts; const {email, password} = input; const result = await db.user.create({data: {email, password}}) return result }), }); So, I was able to resolve this error, by removing the console. Yes, by removing the console. But I dont understand why is the console causing this error ??
3 replies