async function handler (req, res) {
let response;
try {
response = await request('https://user-handler-service') ;
} catch (err) {
logger.error('Http error', err);
return res.status(500).send();
}
let document;
try {
document = await Mongo.findOne({ user: response.body.user });
} catch (err) {
logger.error('Mongo error', err);
return res.status(500).send();
}
executeLogic(document, req, res);
}