From dddf0ee09aba0d0a32910685641e1e31229e1ed0 Mon Sep 17 00:00:00 2001 From: Amir Jafarian Date: Wed, 1 Jun 2016 15:55:25 -0400 Subject: [PATCH] Retun err for UPSERT if the connector returns err --- lib/dao.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dao.js b/lib/dao.js index 458a5b92..62e658fe 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -566,6 +566,7 @@ DataAccessObject.upsert = function(data, options, cb) { }); } function done(err, data, info) { + if (err) return cb(err); var context = { Model: Model, data: data,