Manually rollback in transaction

Does prisma have a method to manually initiated a rollback inside a transaction without throwing an error?
2 Replies
RaphaelEtim
RaphaelEtim2w ago
Hi @dariusj18 At the moment, We do not have support for manually rolling back a transaction. There is an open feature request to support this behaviour. You may also want to check this workaround in that same issue. You can also take a look at this other issue with a suggested workaround.
GitHub
Support manual rollback in interactive transactions · Issue #15211 ...
Problem To rollback an interactive transaction, you have to throw an error. It would be awesome to have a manual rollback function (that potentially takes a data argument to pass back to the parent...
GitHub
Manual transaction commit, rollback · Issue #22309 · prisma/prisma
Problem Since Prisma does not offer manual transaction rollbacks which is one the reason TypeORM is preferred by users over Prisma. I intended to perform an E2E test on the production database, but...
dariusj18
dariusj18OP2w ago
I ended manually throwing a rollback error with a return value and catching it. It is very ugly
Want results from more Discord servers?
Add your server