diff --git a/server.js b/server.js index 60a09c5..9ab05b0 100644 --- a/server.js +++ b/server.js @@ -38,19 +38,14 @@ app.use((err, req, res, _next) => { const thisErr = Object.assign({},err); thisErr.originalUrl = req.originalUrl; - console.log('Error handler', thisErr); - console.log(req); + console.error('Error handler', thisErr); + if(thisErr instanceof IpDeniedError) res.status(401); else res.status(thisErr.status || 500); - /* res.render('error', { - 'message': 'You shall not pass', - 'error': err - });*/ - res.status(403).end(); });