This commit is contained in:
2020-08-20 11:44:32 +02:00
parent 4715fc1814
commit 6aceefeb2f
2891 changed files with 11239 additions and 347539 deletions

View File

@@ -28,7 +28,8 @@ class MongooseServerSelectionError extends MongooseError {
// Special message for a case that is likely due to IP whitelisting issues.
const isAtlasWhitelistError = isAtlas(reason) &&
allServersUnknown(reason) &&
err.message.indexOf('bad auth') === -1;
err.message.indexOf('bad auth') === -1 &&
err.message.indexOf('Authentication failed') === -1;
this.message = isAtlasWhitelistError ?
atlasMessage :
err.message;