Browse Source

[debug] if ES cluster in stage/prod ever returns 408

pull/169/head
Harish Krishna 10 years ago
parent
commit
d2cc05b8e8
  1. 2
      middleware/500.js

2
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;

Loading…
Cancel
Save