Mongoose cast errors include the `typeof` the value that failed. This is very handy for cases when you end up passing in the string "undefined", which happens to the best of us 😀
#NodeJS#JavaScript#MongoDB
Mongoose 6.0.15 released:
🛠️ Avoid overwriting schema methods when creating a new document with new Model() and strict: false
🛠️ Avoid overwriting top-level document _id with nested _id when strict = false
Full changelog: github.com/Automattic/mongoo…#NodeJS#MongoDB#JavaScript
Mongoose 6.0.14 released:
🛠️ Catch errors in required functions
🛠️ Clone schema when passing a schema from a different copy of Mongoose to Connection#model()
Full changelog: github.com/Automattic/mongoo…#NodeJS#MongoDB#JavaScript