add error messages to sync status
This commit is contained in:
parent
24e4241b40
commit
8898e9b8c5
|
@ -45,8 +45,7 @@ exports.show = function(req, res, next) {
|
|||
}
|
||||
};
|
||||
|
||||
exports.sync = function(req, res, next) {
|
||||
exports.sync = function(req, res) {
|
||||
if (req.syncInfo)
|
||||
res.jsonp(req.syncInfo);
|
||||
next();
|
||||
};
|
||||
|
|
|
@ -274,11 +274,13 @@ function spec() {
|
|||
});
|
||||
}
|
||||
|
||||
if (!err)
|
||||
sync();
|
||||
else {
|
||||
if (err) {
|
||||
self.syncInfo = util._extend(self.syncInfo, { error: err.message });
|
||||
return next(err, 0);
|
||||
}
|
||||
else {
|
||||
sync();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue