PrismaP
Prisma2y ago
16 replies
charley

Is it bad practice to depend on the unique constraint while creating a new object?

In my example: I have a User model with unique email. Should I be checking beforehand if the email already exists or does it not really matter because it will throw an error?
Was this page helpful?