Skip to content

Can you detect if an updateOne operation is successful or not? #199

Answered by minox86
Atlinx asked this question in Q&A
Discussion options

You must be logged in to vote

Every Typetta operation return in case of success or throws in case of error. You just need to do something like:

try {
   await entityManager.user.updateOne(...)
} catch (e) {
  // handle error
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Atlinx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants