redirect 500.html on error

This commit is contained in:
Tyler Renelle 2013-01-19 21:46:50 -05:00
parent 3dc9bad6ae
commit 8d01cbbc21

View file

@ -14,5 +14,8 @@ module.exports = (root) ->
status = parseInt message
if status is 404
staticPages.render '404', res, {url: req.url}, 404
else if status >= 400 and status < 600
res.send status
else
res.send if 400 <= status < 600 then status else 500
#TODO send error to email
res.redirect('/500.html')