Nonsense error on correctly structured query

Hi, I got this error in production complaining about values on a list for an "in" filter on a query:
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2oRsfrtFV4WJMvC6lEOiVdufnrt",
sku: {
in: [
"107082002326",
"107082069120",
"109082004770",
"107082089847",
"107084003820",
"107082001513",
"107082001525",
"107082004860",
"107082022468",
"107082022469",
"107182137043",
"107082004816",
"107082004815",
"107082004861"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null).
at An (/var/task/node_modules/@prisma/client/runtime/library.js:114:7526)
at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7392)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6741)
at async Array.$allOperations (/var/task/.next/server/chunks/4499.js:38:691)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9355)
at async j (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:5552)
at async Promise.all (index 0)
at async /var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:4824
at async Proxy._transactionWithCallback (/var/task/node_modules/@prisma/client/runtime/library.js:130:7722) {
clientVersion: '5.17.0'
}
PrismaClientValidationError:
Invalid `prisma.backOrderQueue.findMany()` invocation:

{
where: {
orgId: "org_2oRsfrtFV4WJMvC6lEOiVdufnrt",
sku: {
in: [
"107082002326",
"107082069120",
"109082004770",
"107082089847",
"107084003820",
"107082001513",
"107082001525",
"107082004860",
"107082022468",
"107082022469",
"107182137043",
"107082004816",
"107082004815",
"107082004861"
]
}
}
}

Argument `in`: Invalid value provided. Expected ListStringFieldRefInput, provided (Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null).
at An (/var/task/node_modules/@prisma/client/runtime/library.js:114:7526)
at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7392)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6741)
at async Array.$allOperations (/var/task/.next/server/chunks/4499.js:38:691)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9355)
at async j (/var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:5552)
at async Promise.all (index 0)
at async /var/task/.next/server/app/api/inventory/order/[orderId]/route.js:1:4824
at async Proxy._transactionWithCallback (/var/task/node_modules/@prisma/client/runtime/library.js:130:7722) {
clientVersion: '5.17.0'
}
The logged query shows that the query passed has a list of strings and not a list of nulls as suggested by the error message. Has anyone ever stumbled across this before? I'm unable to reproduce, as the same code runs normally. Bot conversation: https://discord.com/channels/937751382725886062/1319378542412300348
1 Reply
Nurul
Nurul•2d ago
Hello @Giovani Granzotto 👋 If I understand correctly, you got this error once in your deployed application. And this error doesn't seem to happen in your local environment, correct?
Want results from more Discord servers?
Add your server