Sunday, 4 June 2017

Mongodb Mongoose insertMany crashing when duplicate

I have insertMany and set ordered to false to continue on error but I get an error

Computer.insertMany(list, {ordered: false}, function(error, docs){
        if (error) {
            return next(error);
        }else {
            res.redirect('/computers');
        }
    });

This is what I get in the console

enter image description here

Thank you for the help



via Rozh Ali

No comments:

Post a Comment