I have this function, which essentially does this:
const database = context.services.get("mongodb-atlas").db("store");
const skusColl = database.collection("skus");
const skuId = new BSON.ObjectId(arg);
const sku = database.collection.find({_id: skuId}).toArray();
calling the above in the console with: exports(‘611e5e564faf609f0d9aaa97’) throws the following error:
TypeError: Value is not an object: undefined