Major refactor of service libs, more tests

This commit is contained in:
Jonathan Cremin 2014-12-11 19:53:12 +00:00
parent cda69ea472
commit ce3ff0442c
19 changed files with 288 additions and 118 deletions

View file

@ -36,7 +36,7 @@ module.exports = function(req, res, next) {
error = new Error("Error talking to music service");
error.status = "502";
next(error);
} else if (!error.status) {
} else if (!error || !error.status) {
error = new Error("An unexpected error happenend");
error.status = 500;
next(error);