Add error handling to redirectToSignup promise

Fixes #1078
- Add an otherwise error callback to the redirectToSignup promise
This commit is contained in:
nason 2013-10-16 01:10:09 -07:00
parent a5c35d451a
commit 6a5e399997

View File

@ -74,9 +74,10 @@ function redirectToSignup(req, res, next) {
if (users.length === 0) {
return res.redirect('/ghost/signup/');
}
next();
}).otherwise(function (err) {
return next(new Error(err));
});
next();
}
// While we're here, let's clean up on aisle 5