Skip to content

Commit 15307a4

Browse files
committed
DOCSP-34891: Add admonition to mention users must catch errors raised by withTransaction() callback (#922)
(cherry picked from commit dc66c14)
1 parent 099c050 commit 15307a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/fundamentals/transactions.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ if a callback you pass to the ``withTransaction()`` method returns the
177177
document ``{ hello: "world" }``, then the ``withTransaction()`` method
178178
also returns that document.
179179

180+
.. important::
181+
182+
To avoid infinite looping errors, ensure that the callback you pass to
183+
the ``withTransaction()`` method catches any errors that it raises.
184+
180185
When you use the Convenient Transaction API, you
181186
can propagate return values from the callback as the return values of
182187
the ``withTransaction()`` and ``withSession()`` methods to

0 commit comments

Comments
 (0)