You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the transaction docs, it appears that no error will be thrown by calling rollback() on a transaction, but doing so will throw a TransactionRollbackError. Should the docs be updated?
Documented behavior:
The code provided in the docs:
seems to be misleading, as the await before tx.rollback() is a no-op, and the return underneath will never be called. What will actually happen is that rollback() will throw an error, which is uncaught in this code example.
From the transaction docs, it appears that no error will be thrown by calling
rollback()
on a transaction, but doing so will throw aTransactionRollbackError
. Should the docs be updated?Documented behavior:
The code provided in the docs:
seems to be misleading, as the
await
beforetx.rollback()
is a no-op, and thereturn
underneath will never be called. What will actually happen is thatrollback()
will throw an error, which is uncaught in this code example.Actual behavior:
This suggests that throwing was unintentional behavior, but according to this issue in the
drizzle-orm
repo, it is intentional but undocumented.The text was updated successfully, but these errors were encountered: