What information does the API call require from the insert operation?

Remember that a transaction is designed to allow multiple documents to be updated atomically. If one of the updates fails then a ‘rollback’ occurs automatically. I speak under correction but I am not sure that you can explicitly ‘fail’ a transaction.

There are multiple ways you could fix this without transactions. For example, you could add a field to the document in the insert operation (like pending: true), and then update or remove it after the API call completes.

1 Like