Handling a huge amount of data

Hi! I Have approx one million records in index, and want to process some bulk actions on them.
Using nodeJs I wrote method like this:

      await this.index.browseObjects<Entity>({
        filters: filter,
        attributesToRetrieve: ['someAttribute'], //just to reduce volume of data.
        batch: async (batch) => {
          //do some work with a batch
        },
      });

But what if in the middle of data processing my app failed - have I any mechanism to understand where I’m exactly fail and as part of recovery process - start from this point?