Skip to content

Commit

Permalink
Merge pull request #82 from zfarrell/partials-404
Browse files Browse the repository at this point in the history
fix(node:express): return 404 status code when partial can't be found
  • Loading branch information
DaftMonk committed Feb 13, 2014
2 parents 4542fda + afb9d37 commit b37eb00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/express/controllers/index.js
Expand Up @@ -10,6 +10,8 @@ exports.partials = function(req, res) {
var requestedView = path.join('./', stripped);
res.render(requestedView, function(err, html) {
if(err) {
console.log("Error rendering partial '" + requestedView + "'\n", err);
res.status(404);
res.send(404);
} else {
res.send(html);
Expand Down

0 comments on commit b37eb00

Please sign in to comment.