message: move wait into try block
diff: @@ -110,12 +110,13 @@ export abstract class BatchSearchEngineIndexer extends Writable {
  * @internal
  */
  async _final(done: (error?: Error | null) => void) {
  + try {
  const maybeError = await this.initialized;
  if (maybeError) {
  done(maybeError);
  return;
  }
  - try {
  +
  // Index any remaining documents.
  if (this.currentBatch.length) {
  await this.index(this.currentBatch);
  