I am trying to run an asynchronous loop async.each over an array of objects.
On each object in the array, I am trying to run two functions sequentially (using
You are only using .then() callbacks so you handle success.
But you should also add some .catch() callbacks to handle errors.
Most likely you get errors that are not handled and nothing happens.
For example:
// ...
}).then( function(result) {
console.log("here");
callback();
}).catch(function (error) {
console.log('Error:', error);
callback(error);
});