diff --git a/lib/connection.js b/lib/connection.js index 85a00c27bcb..d9dabf5b04e 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -424,7 +424,7 @@ Connection.prototype.startSession = _wrapConnHelper(function startSession(option * in a transaction. Mongoose will commit the transaction if the * async function executes successfully and attempt to retry if * there was a retriable error. - * + * * Calls the MongoDB driver's [`session.withTransaction()`](http://mongodb.github.io/node-mongodb-native/3.5/api/ClientSession.html#withTransaction), * but also handles resetting Mongoose document state as shown below. * @@ -435,7 +435,7 @@ Connection.prototype.startSession = _wrapConnHelper(function startSession(option * doc.rank = 'Captain'; * await doc.save({ session }); * doc.isNew; // false - * + * * // Throw an error to abort the transaction * throw new Error('Oops!'); * }).catch(() => {});