Call 'next()' on ENOENT errors #12

Closed
wants to merge 1 commit into
from
View
@@ -36,8 +36,9 @@ function addRoute(regex, renderer) {
function handleRoute(req, res, next, renderer, match) {
function callback(err, data) {
if (err) {
- next(err);
- return;
+ return err.errno === process.ENOENT
+ ? next()
+ : next(err);
}
res.writeHead(200, data.headers);
res.end(data.buffer);