Don't use console.log but rather winston.error (winston is a logging framework). Also you should send something back through http, such as res.json(400, err);