From ab671917f740544264b9815025002d2c27fd5223 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 27 Jul 2013 21:14:19 -0400 Subject: [PATCH] Send proper HTTP status code for failed files --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index d5b9d0ed..54d71fc3 100644 --- a/server.js +++ b/server.js @@ -107,7 +107,10 @@ var Server = { } // Something actually went wrong else { - res.send(500); + // Status codes over 500 are server errors + if(err.status >= 500) + Logger.errlog.log(err); + res.send(err.status); } } });