Skip to content

Commit 4ba636d

Browse files
committed
Fix MONGODB_URI reference in error message
1 parent 0670c5a commit 4ba636d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/storage/mongo-storage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ function init (env, cb, forceNewConnection) {
5252
.catch(err => {
5353
if (err.message && err.message.includes('AuthenticationFailed')) {
5454
console.log('Authentication to Mongo failed');
55-
cb(new Error('MongoDB authentication failed! Double check the URL has the right username and password in MONGO_CONNECTION.'), null);
55+
cb(new Error('MongoDB authentication failed! Double check the URL has the right username and password in MONGODB_URI.'), null);
5656
return;
5757
}
5858

5959
if (err.name && err.name === "MongoNetworkError") {
6060
var timeout = (i > 15) ? 60000 : i * 3000;
6161
console.log('Error connecting to MongoDB: %j - retrying in ' + timeout / 1000 + ' sec', err);
6262
setTimeout(connect_with_retry, timeout, i + 1);
63-
if (i == 1) cb(new Error('MongoDB authentication failed! Double check the MONGO_CONNECTION setting in Heroku.'), null);
63+
if (i == 1) cb(new Error('MongoDB connection failed! Double check the MONGODB_URI setting in Heroku.'), null);
6464
} else {
6565
cb(new Error('MONGODB_URI ' + env.storageURI + ' seems invalid: ' + err.message));
6666
}

0 commit comments

Comments
 (0)