These are chat archives for Automattic/mongoose
I tried first with classic
.catchbut wouldn't work
.catch(). However, in mongoose >= 4.1.0 you can substitute your favorite ES6-compatible promises library. For instance,
require('mongoose').Promise = global.Promise;for native promises,
require('mongoose').Promise = require('bluebird');for bluebird, or
require('mongoose').Promise = require('q').Promise;for Q.
mpromiseis the default for backwards compatibility (although this is scheduled to change in 5.0 https://github.com/Automattic/mongoose/wiki/5.0-Deprecation-Warnings) and it's sufficient for things like co/yield, but I'd recommend using else if you rely heavily on promises.