🍃 MongoDB errors

MongoDB and Mongoose errors — connection strings, authentication, validation and duplicate keys.

CodeErrorWhat it means
MongoParseError MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://" The connection string is missing, malformed, or the environment variable holding it is undefined.
bad auth : Authentication failed MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18) MongoDB (often Atlas) rejected the username/password in the connection string.
Document failed validation MongoDB: MongoServerError: Document failed validation (code 121) The collection has a JSON Schema validator and the inserted/updated document doesn’t satisfy it.