diff --git a/controllers/program.js b/controllers/program.js index bfcdabe..fe5442e 100644 --- a/controllers/program.js +++ b/controllers/program.js @@ -166,7 +166,7 @@ module.exports = function (app) { var data = req.remote.data; if (err) - return next(data.message); + return next({status: err, message: data.message}); res.render('badges/list.html', { filters: getFilters(),