hi, is there any better way to handle prisma clien...
# orm-help
d
hi, is there any better way to handle prisma client erors? other than that
Copy code
if (
        e instanceof Prisma.PrismaClientKnownRequestError &&
        e.code === 'P2002'
      ) {
        throw new ConflictException("Email already used"));
      } else {
        throw new Error(e);
      }
1
h