diff --git a/packages/shell-api/src/mongo-errors.spec.ts b/packages/shell-api/src/mongo-errors.spec.ts index 3cb809dc01..f841da4655 100644 --- a/packages/shell-api/src/mongo-errors.spec.ts +++ b/packages/shell-api/src/mongo-errors.spec.ts @@ -97,7 +97,7 @@ describe('mongo-errors', () => { expect(e).to.equal(error); expect(e.message).to.contain('not primary and secondaryOk=false'); expect(e.message).to.contain('db.getMongo().setReadPref()'); - expect(e.message).to.contain('readPref'); + expect(e.message).to.contain('readPreference'); } }); }); diff --git a/packages/shell-api/src/mongo-errors.ts b/packages/shell-api/src/mongo-errors.ts index 58a71f349e..fb7d306dec 100644 --- a/packages/shell-api/src/mongo-errors.ts +++ b/packages/shell-api/src/mongo-errors.ts @@ -8,7 +8,7 @@ const ERROR_REPHRASES: MongoErrorRephrase[] = [ { // NotPrimaryNoSecondaryOk (also used for old terminology) code: 13435, - replacement: 'not primary and secondaryOk=false - consider using db.getMongo().setReadPref() or readPref in the connection string' + replacement: 'not primary and secondaryOk=false - consider using db.getMongo().setReadPref() or readPreference in the connection string' } ];