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.

Add update of non-existent node to known errors

See original GitHub issue

For this Prisma Client code:

  const result = await client.user.update({
    where: {
      id: 123012938,
    },
    data: {},
  })

As of now, we get an error like this:

PrismaClientUnknownRequestError: 
Invalid `prisma.users.update()` invocation:

Error occurred during query execution:
InterpretationError("Error for binding \'0\': RecordNotFound(\"Record to update not found.\")")

We should add that to the known errors and return an error code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
Cretezycommented, Apr 13, 2021

Is there a way to disable this error checking?

Our use case is an update, but it’s possible the record doesn’t exist (which would be a no-op). We don’t care in this case that the record doesn’t exist. Ideally, a argument to update such as ignoreMissing would be the solution here.

5reactions
PierreAndreiscommented, Apr 28, 2021

Is there a way to disable this error checking?

Our use case is an update, but it’s possible the record doesn’t exist (which would be a no-op). We don’t care in this case that the record doesn’t exist. Ideally, a argument to update such as ignoreMissing would be the solution here.

I would like that as well, but does updateMany resolve this for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "non-existent config entity name returned by ...
acbramley: I am getting errors related to custom fields that were added to basic page and article in Drupal 7 prior to upgrading...
Read more >
Create a known error article
Create known error articles as reference material. The known error articles document the root cause and the workaround of the problem to help ......
Read more >
Errors | Node.js v19.3.0 Documentation
System errors triggered by underlying operating system constraints such as attempting to open a file that does not exist or attempting to send...
Read more >
Start script missing error when running npm start
Save this question. Show activity on this post. I'm receiving this error when trying to debug my node application using the npm start...
Read more >
"Key for Common node missing in Request Message" error ...
"Key for Common node missing in Request Message" error issue during update custom bo from supplier. · Help to improve this question by...
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