These are chat archives for Automattic/mongoose

4th
Dec 2015
Diego Aguilar Aguilar
@diegoaguilar
Dec 04 2015 17:33
Hello, where can I see the list of errors that Mongoose can throw?
I'd like to write some mongoose error handling middleware
Valeri Karpov
@vkarpov15
Dec 04 2015 20:45
@lukechilds why not just look up by the last updated time you saw? Post.find({ updated: { $lte: lastSeen } }).sort('-updated');
@uptownhr yeah you have to remove duplicates. dropDups is gone in 3.0: https://docs.mongodb.org/manual/release-notes/3.0-compatibility/#remove-dropdups-option so you should do it manually
@diegoaguilar that's pretty tricky since that list includes all the error types defined in mongoose: https://github.com/Automattic/mongoose/tree/master/lib/error, as well as errors that the underlying mongodb driver can trigger, which in turn includes all errors that the mongodb server can trigger
Tyler Langan
@TylerL-uxai
Dec 04 2015 21:45
Does anyone know the best version of mongoose to put in my package.json? 3.8 is broken for some reason
Christopher Shelley
@basiclaser
Dec 04 2015 22:48
@vkarpov15 if i’ve created a text index in mongoDB, do i search it with mongoose using the find method or aggregate?