add error messages to sync status

This commit is contained in:
Matias Alejo Garcia 2014-01-19 21:43:10 -03:00
parent 24e4241b40
commit 8898e9b8c5
2 changed files with 6 additions and 5 deletions

View File

@ -45,8 +45,7 @@ exports.show = function(req, res, next) {
} }
}; };
exports.sync = function(req, res, next) { exports.sync = function(req, res) {
if (req.syncInfo) if (req.syncInfo)
res.jsonp(req.syncInfo); res.jsonp(req.syncInfo);
next();
}; };

View File

@ -274,11 +274,13 @@ function spec() {
}); });
} }
if (!err) if (err) {
sync(); self.syncInfo = util._extend(self.syncInfo, { error: err.message });
else {
return next(err, 0); return next(err, 0);
} }
else {
sync();
}
}); });
}; };