Misleading error message when connecting to MongoDB Atlas with wrong password
When you connect to MongoDB Atlas from your application with wrong password using Mongoose, you get error message:
"Could not connect to any servers in your MongoDB Atlas cluster. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist "
even though your IP address is whitelisted.
Very frustrating and misleading error message, please fix this!!
-
Manas commented
Thank you Jesse.
I will create a new issue on the mongoose github project.
-
AdminJesse (Admin, MongoDB) commented
Hi Manas,
Thanks for raising this. Unfortunately, mongoose is not a tool that we manage. The error message you've called out is something that the team added to help with another issue, IP whitelisting. I can see how it would be frustrating to experience this when that is not actually the problem.
I'm sure the mongoose team would appreciate the feedback. The line of code that throws this error is here[1] and you can create issues in their GitHub project here: https://github.com/Automattic/mongoose/issues
Best,
Jesse