TypeError: The "payload" argument must be of type object. Received null

There's an ongoing issue in our codebase where Prisma queries that fail give the error in the title, which isn't the typical error we see in other projects. Our project is using NextJS 15.0.2 and Prisma (with neon serverless adapter) 5.22.0. Here is the client: import { Pool } from "@neondatabase/serverless"; import { PrismaNeon } from "@prisma/adapter-neon"; import { PrismaClient } from "@prisma/client"; const globalForPrisma = global as unknown as { prisma: PrismaClient }; function makeClient() { const neon = new Pool({ connectionString: process.env.DATABASE_URL }); const adapter = new PrismaNeon(neon); return new PrismaClient({ adapter }); } const db = globalForPrisma.prisma || makeClient(); if (process.env.NODE_ENV === "development") { globalForPrisma.prisma = db; } export default db;
1 Reply
RaphaelEtim
RaphaelEtim2d ago
Hi @яσчαℓтℓя Can you please enable detailed debugging and share the relevant logs? https://www.prisma.io/docs/orm/prisma-client/debugging-and-troubleshooting/debugging
export DEBUG="*"
export DEBUG="*"
Debugging (Reference) | Prisma Documentation
This page explains how to enable debugging output for Prisma Client by setting the DEBUG environment variable.
Want results from more Discord servers?
Add your server