Giovani Granzotto
Giovani Granzotto
Explore posts from servers
PPrisma
Created by Giovani Granzotto on 12/19/2024 in #help-and-questions
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
15 replies
PPrisma
Created by Giovani Granzotto on 12/5/2024 in #help-and-questions
Migration containing DML statements hangs mysteriously
Hi, I'm changing the shape of my schema but wanted to preserve existing user data, which is why I wrote a bunch of queries to shape the data into the new format. I created this by using npx prisma migrate --create-only then editing the file to place my data processing steps in between the DDL changes. When I try applying it, it apparently executes the changes on the database, but the migrate command keeps hanging at this step, so I can't trust it to run correctly on my production build.
prisma:schemaEngine:stderr {"timestamp":"2024-12-05T17:52:23.843630407Z","level":"INFO","fields":{"message":"Applying `20241205134002_change_backorderqueue_grouping_to_sku`",
prisma:schemaEngine:stderr {"timestamp":"2024-12-05T17:52:23.843630407Z","level":"INFO","fields":{"message":"Applying `20241205134002_change_backorderqueue_grouping_to_sku`",
Could someone from the team let me know if prisma supports running these non DDL statements on migrations or not? If not, I'll have to add a temporary table and run the data processing migration queries by hand when deploying to production, something I'd like to avoid if possible.
11 replies
CCConvex Community
Created by Giovani Granzotto on 7/30/2024 in #support-community
Prod build error broken: 403 Forbidden: ReadOnlyAdminKey: You do not have permission
No description
13 replies
CCConvex Community
Created by Giovani Granzotto on 7/26/2024 in #support-community
Confusing errors on db.patch calls inside mutation
No description
4 replies