Skip to content

Commit

Permalink
DOCSP-34891: Add admonition to mention users must catch errors raised…
Browse files Browse the repository at this point in the history
… by withTransaction() callback (#922)

(cherry picked from commit dc66c14)
  • Loading branch information
mcmorisi committed Nov 4, 2024
1 parent 5bb56fd commit bd03fa3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/fundamentals/transactions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ if a callback you pass to the ``withTransaction()`` method returns the
document ``{ hello: "world" }``, then the ``withTransaction()`` method
also returns that document.

.. important::

To avoid infinite looping errors, ensure that the callback you pass to
the ``withTransaction()`` method catches any errors that it raises.

When you use the Convenient Transaction API, you
can propagate return values from the callback as the return values of
the ``withTransaction()`` and ``withSession()`` methods to
Expand Down

0 comments on commit bd03fa3

Please sign in to comment.