From 596cd13ca5c350c835c033d4c7447ce05b7d2a50 Mon Sep 17 00:00:00 2001 From: Seb Gotvitch Date: Mon, 21 Oct 2013 01:53:26 -0400 Subject: [PATCH] Keep the status code generate by connect in case of error. The status code generate by connect/express in case of error was always replace by 500 status. --- core/server/errorHandling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/errorHandling.js b/core/server/errorHandling.js index 71e8930bdb..9223604723 100644 --- a/core/server/errorHandling.js +++ b/core/server/errorHandling.js @@ -191,7 +191,7 @@ errors = { } errors.renderErrorPage(500, err, req, res, next); } else { - res.send(500, err); + res.send(err.status || 500, err); } } };