throwing custom errors from trpc mutations

any idea why trpc is ignoring the catch expression? it just throws its own error about unique constraint violation, i want to throw this custom error when there's a unique constraint violation in prisma but trpc is ignoring my catch expression completely
No description
1 Reply
BootesVoid
BootesVoid16mo ago
Are you sure the error returned is instance of Prisma.PrismaClientKnownRequestError Try it without that
Want results from more Discord servers?
Add your server