medusajs/medusa · error · Error

[Index engine] Failed to continue sync

Error message

[Index engine] Failed to continue sync

What it means

continueSync (part of sync) wraps entity synchronization in a try/catch; if the data synchronizer throws for any entity, the original error is logged and this generic '[Index engine] Failed to continue sync' error is rethrown.

Source

Thrown at packages/modules/index/src/services/index-module-service.ts:375

            internal: true,
          },
        })
      })

      return
    }

    try {
      const entities = await this.configurationChecker_.checkChanges()

      if (!entities.length) {
        return
      }

      return await this.dataSynchronizer_.syncEntities(entities)
    } catch (e) {
      this.logger_.error(e)
      throw new Error("[Index engine] Failed to continue sync")
    }
  }

  private async fullSync() {
    if (!this.#isWorkerMode) {
      await this.baseRepository_.transaction(async (transactionManager) => {
        await promiseAll([
          this.indexMetadataService_.update(
            {
              selector: {
                status: [
                  IndexMetadataStatus.DONE,
                  IndexMetadataStatus.ERROR,
                  IndexMetadataStatus.PROCESSING,
                ],
              },
              data: {
                status: IndexMetadataStatus.PENDING,

View on GitHub (pinned to 5e06e544a2)

Solutions

  1. Check the preceding logger_ output for the underlying exception and fix that
  2. Re-run sync({ strategy: 'full' }) to rebuild from scratch if state is inconsistent
  3. Ensure the index module config/schema matches current module versions
Defensive patterns

Strategy: retry

Try / catch

try { await indexService.sync() } catch (e) { if (e.message === '[Index engine] Failed to continue sync') { await indexService.sync({ strategy: 'full' }) } else throw e }

Prevention

When it happens

Trigger: Resuming an interrupted index synchronization where a entity's data fails to transform/insert — schema drift, connection drops, or an entity listener error inside the synchronizer.

Common situations: Index worker restarting mid-sync; changed module entity definitions without re-running the index setup.

Related errors


AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27). Data as JSON: /api/errors/fc33fd9ee26c58ad. Report an issue: GitHub.