Transaction Not In Progress, Cannot Be Used In Api Requests. Firestore Error
I am learning transactions on firestore and I making some modifications to the sample functions of documentation but I'm not sure why I get 'Transaction not in progress...' when I
Solution 1:
The function, or better to say the decorator @firestore.transactional
was an essential part of the logic. The error message means you didn't start the transaction, you've just instantiated a trnsaction object.
You could begin the transaction manually using transaction._begin
, but I'd strangly suggest against it. Just use the decorater which provides simple way to manage transactions, including for example error handling.
Post a Comment for "Transaction Not In Progress, Cannot Be Used In Api Requests. Firestore Error"