From dc66c14677adbad2f765c5acd6a2f94164c2acbc Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 4 Nov 2024 13:17:01 -0500 Subject: [PATCH] DOCSP-34891: Add admonition to mention users must catch errors raised by withTransaction() callback (#922) --- source/fundamentals/transactions.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index fc89d0afc..d61f0c95e 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -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