Resource closing in a promise chain
I've discovered that node.js v10 supports .finally() for promises (or you could employ a polyfill) so it could be slightly improved by moving the close() logic into a .finally() handler.  

function getBlocked(data) {
    let openDb;

    return MongoClient.connect(url).then(db =&gt; {
        openDb = db;
        const blQ = {blocked_user:data.tag_search_mail};
        return db.collection("block_list").find(blQ,{"_id":0}).toArray();
    }).then(results =&gt; {
        let blocked = results.map(item =&gt; item.blocker);
        return blocked;     // make this the resolved value of the promise
    }).finally(() =&gt; {
        if (openDb) {
            openDb.close().catch(err =&gt; {
                console.log("Error closing db: ", err);
            })
        }
    });
}




Now, it seems as an additional improvement for this particular usage, you can move the .finally() clause to a place where you don't have to save the db variable to the higher scope because all paths with a successfully open db go through one promise chain (assuming no exception in the .then() handler is thrown before db.collection() is called:

function getBlocked(data) {
    return MongoClient.connect(url).then(db =&gt; {
        const blQ = {blocked_user:data.tag_search_mail};
        return db.collection("block_list").find(blQ,{"_id":0}).toArray().finally(() =&gt; {
            db.close().catch(err =&gt; {
                console.log("Error closing db: ", err);
            });
        });
    }).then(results =&gt; {
        let blocked = results.map(item =&gt; item.blocker);
        return blocked;     // make this the resolved value of the promise
    });
}