lib/mongodb/mongodb-core/lib/auth/scram.js
function(err, r) {
      if (err) {
        numberOfValidConnections = numberOfValidConnections - 1;
        errorObject = err;
        return false;
      } else if (r.result['$err']) {
        errorObject = r.result;
        return false;
      } else if (r.result['errmsg']) {
        errorObject = r.result;
        return false;
      } else {
        numberOfValidConnections = numberOfValidConnections + 1;
      }

      return true;
    }
function(err, r) {
      if (err) {
        numberOfValidConnections = numberOfValidConnections - 1;
        errorObject = err;
        return false;
      } else if (r.result['$err']) {
        errorObject = r.result;
        return false;
      } else if (r.result['errmsg']) {
        errorObject = r.result;
        return false;
      } else {
        numberOfValidConnections = numberOfValidConnections + 1;
      }

      return true;
    }
function ( err , r ) { if ( err ) { numberOfValidConnections = numberOfValidConnections - 1 ; errorObject = err ; return false ; } else if ( r . result [ '$err' ] ) { errorObject = r . result ; return false ; } else if ( r . result [ 'errmsg' ] ) { errorObject = r . result ; return false ; } else { numberOfValidConnections = numberOfValidConnections + 1 ; } return true ; }
Handle the error
Handle the error