Error The "payload" argument must be of type object. Received null
Hello, I keep getting this error with Next.js 15 Postgre SQL and Prisma.
I'm confused on if it's a Prisma bug or something else?
I'm checking my object before performing any mutation, and it's not null.
Anybody know the reason and how to fix it?
I've tried rebooting, still nothing
4 Replies
Hi @Marvingg 👋
When exactly do you get this error? Once you do a database query or it happens as soon as you start your app?
Would you be able to provide a reprodiction so that we can check?
All good, fault was mine. I was comparing the wrong Id in my nested model nested relationship config 🐵
I am glad to hear that the issue is resolved 🙌
same issue here, it happens when trying to create a record which has a field value same as a field value in a record in the database which
@unique
constraint.
the error
I know this is weird, but the issue happens when there is a console.log
in a catch block, if I remove it, the error doesn't appear.