ConnectorError Some(WasNull()) on `String[]` field with `NULL` entries
See original GitHub issueBug description
When running Prisma in production I occasionally get this error:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: FromSql(6), cause: Some(WasNull) }) })
How to reproduce
I cannot reproduce this reliably, but can provide DM a Sentry error for diagnosis.
Expected behavior
No error should be thrown.
Prisma information
Prisma Query:
const user = await prisma.user.findUnique({
where: { id: data.userId },
rejectOnNotFound: true,
});
Relevant schema:
model User {
id Int @id @default(autoincrement())
}
Environment & setup
- OS:
- Database:
- Node.js version:
Running on Heroku with PostgreSQL 13 against Node.js v16.13.1.
Prisma Version
prisma : 3.4.0
@prisma/client : 3.4.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 1c9fdaa9e2319b814822d6dbfd0a69e1fcc13a85
Studio : 0.438.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Handling the null value from a resultset - Stack Overflow
getString() will throw a NullPointerException when the column is null. If column is null, I want the output to be an empty string...
Read more >java.sql.ResultSet.wasNull java code examples - Tabnine
Checking for a null int value from a Java ResultSet. int iVal; ResultSet rs = magicallyAppearingStmt.executeQuery(query); if (rs.next()) { iVal = rs.
Read more >Chapter 4, “Writing MySQL-Based Programs” - O'Reilly
Identifying NULL values in result sets. NULL values are special not only when you construct statements but also in the results returned from...
Read more >Java ResultSet wasNull() method with example - Tutorialspoint
Java ResultSet wasNull() method with example - When we execute certain ... If there are null values in the column this method returns...
Read more >Fix list for IBM WebSphere Application Server V8.5
PH43825, Support urlencoded string in the SSL certificate ... Java SDK, PI80895, MYFACES-3415 - [UI:REPEAT] field value disappears if validation error ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the concise reproduction @westmark. I was able to reproduce the error.
Hey,
Given the clear error message we now have, is it acceptable to close this?
To be clear, Prisma unfortunately doesn’t support nullable scalar lists at the moment but we already have a feature request here.