From d2cc05b8e893c11c55d0aa56e8b4ecd7e4c0b367 Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Tue, 14 Jul 2015 14:16:46 -0400 Subject: [PATCH] [debug] if ES cluster in stage/prod ever returns 408 --- middleware/500.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/500.js b/middleware/500.js index 9f274e23..5a5b8eec 100644 --- a/middleware/500.js +++ b/middleware/500.js @@ -5,7 +5,7 @@ function middleware(err, req, res, next) { logger.error( 'Error: `%s`. Stack trace: `%s`.', err, err.stack ); res.header('Cache-Control','no-cache'); if( res.statusCode < 400 ){ res.status(500); } - res.json({ error: err && typeof err.message === 'string' ? err.message : 'internal server error' }); + res.json({ error: res.statusCode + ':' + (err && typeof err.message === 'string' ? err.message : 'internal server error' )}); } module.exports = middleware;