chore(VersionError): add debug code to emails showing completed ops
This adds a field to the email if there is an error on batchUpdate. This field contains all the attempted operations. So the last item in the list would be the operation that we encountered the error at. @lefnire, mind taking a look at this and pushing if you feel comfortable with adding more to the emails?
This commit is contained in:
@@ -437,10 +437,12 @@ api.batchUpdate = function(req, res, next) {
|
||||
api[_req.op](_req, res);
|
||||
};
|
||||
|
||||
res.locals.ops = [];
|
||||
// Setup the array of functions we're going to call in parallel with async
|
||||
var ops = _.transform(req.body, function(result, _req) {
|
||||
if (!_.isEmpty(_req)) {
|
||||
result.push(function(cb) {
|
||||
res.locals.ops.push(_req);
|
||||
callOp(_req, cb);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user