MongoTransactionError
Node.jsMongoAPIErrortransaction
An error related to multi-document transaction usage
What is happening?
MongoTransactionError indicates incorrect usage of the transaction API — such as running operations on a transaction that has already been committed or aborted, or attempting transactions on a topology that doesn't support them (standalone).
Common causes
- Running operations after commitTransaction or abortTransaction
- Starting a transaction on a standalone server (requires replica set)
- Attempting nested transactions (not supported)
- Session already has an active transaction