d.on('error', function(error){
        console.log(error.stacktrace);
        res.status(500).send({'error': error.message});
    });