No PrismaClientKnownRequestError if error in transaction #7399
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: error
topic: transaction
Milestone
Bug description
If you attempt to delete a row which does not exist in a transaction, you get a
If you attempt the same without transaction, you get a PrismaClientKnownRequestError with a code P2025, which is expected.
How to reproduce
With this code:
Output is the following. Error raised is a PrismaClientKnownRequestError
However, if you wrap this in a transaction,
Output is the following:
Expected behavior
Even in the transaction, Error should be a PrismaClientKnownRequestError with a code P2025
Prisma information
Schema can be as simple as that
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: