From 3dfe23bd15121fe03804323144c64874a292d4b4 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 7 Jun 2021 13:17:41 +0200 Subject: [PATCH] fix(shell-api): refer to correct connection string parameter name --- packages/shell-api/src/mongo-errors.spec.ts | 2 +- packages/shell-api/src/mongo-errors.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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' } ];