We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ec04f0 commit dbfe4f5Copy full SHA for dbfe4f5
lib/core/error.js
@@ -192,7 +192,7 @@ function isNotMasterError(err) {
192
}
193
194
function isNodeShuttingDownError(err) {
195
- return SDAM_NODE_SHUTTING_DOWN_ERROR_CODES.has(err.code);
+ return err.code && SDAM_NODE_SHUTTING_DOWN_ERROR_CODES.has(err.code);
196
197
198
/**
test/functional/connections_stepdown_tests.js
@@ -4,7 +4,9 @@ const chai = require('chai');
4
const expect = chai.expect;
5
6
function ignoreNsNotFound(err) {
7
- if (!err.message.match(/ns not found/)) throw err;
+ if (!err.message.match(/ns not found/)) {
8
+ throw err;
9
+ }
10
11
12
function connectionCount(db) {
0 commit comments