Reactive stream code with error "Command failed with error 251 (NoSuchTransaction): 'Transaction with { txnNumber: 1 } has been aborted

Errors in server-side operations, such as the DuplicateKeyError, can end the transaction and result in a command error to alert the user that the transaction has ended. This behavior is expected and occurs even if the client never calls Session.abortTransaction(). To incorporate custom error handling, use the Core API on your transaction.

E11000 (not 1100) is a Duplicate Key Error

2 Likes