question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ConnectorError Some(WasNull()) on `String[]` field with `NULL` entries

See original GitHub issue

Bug 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:open
  • Created 2 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
pantharshit00commented, Mar 22, 2022

Thanks for the concise reproduction @westmark. I was able to reproduce the error.

1reaction
Weakkycommented, Nov 29, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found