Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit d95a4d1

Browse files
authored
fix(sessions): add toBSON method to ClientSession
Fixes NODE-1518
1 parent c4add26 commit d95a4d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/sessions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ class ClientSession extends EventEmitter {
220220
);
221221
});
222222
}
223+
224+
toBSON() {
225+
throw new Error('ClientSession cannot be serialized to BSON.');
226+
}
223227
}
224228

225229
function endTransaction(session, commandName, callback) {

0 commit comments

Comments
 (0)