// error happens because of https://github.com/AdriVanHoudt/Hapi-Boombox/blob/master/lib/index.js#L42 exports.getAll = function (request, reply) { return Entity.getAll(request.auth.credentials.team, dbConn, (err, result) => { if (err) { return reply(err); } return Async.map(result, (item, callback) => { if (item.id) { return Entity.getSubStuff(item.id, dbConn, (err, stuff) => { if (err) { return callback(err); } item.stuff = stuff; // 3: getSubStuff is done after reply with error and calls callback return callback(null, item); }); } return Entity.getOtherStuff(request.auth.credentials.team, dbConn, (err, otherStuff) => { if (err) { // 1: errors return callback(err); } item.stuff = otherStuff; return callback(null, item); }); }, (err, results) => { // 2: call reply with error // 4: reply gets called again return reply(err, results); }); }); };