In progressPrismaClientKnownRequestError P2002Prisma's create() (or update()) was rejected because the row it tried to write conflicts with a unique index or constraint. This is Postgres's own uniqueness check firing — Prisma is just the messenger.
View the whole map (6 more steps)
Is this an expected duplicate, or a bug in how the record is being created?
Prisma is correctly enforcing the constraint — handle it instead of preventing it
An unexpected duplicate means something upstream is wrong
Catch P2002 explicitly, or switch to upsert
Confirm duplicates are now handled without an unhandled exception
Resolved
What to test
PrismaClientKnownRequestError P2002
Prisma's create() (or update()) was rejected because the row it tried to write conflicts with a unique index or constraint. This is Postgres's own uniqueness check firing — Prisma is just the messenger.