Skip to content

Improve error handling for settings updates in MeilisearchImportCommand #392

@coderabbitai

Description

@coderabbitai

Problem

After PR #391, settings updates now occur before document import in the MeilisearchImportCommand. If SettingsUpdater::update() throws an exception (e.g., TimeOutException, connectivity issues), the entire import command terminates silently without indexing any documents, potentially leaving the index empty.

Proposed Solution

Add error handling around the settings update call to:

  • Catch exceptions and provide clear error messages to operators
  • Decide whether to fail fast or continue with document import when settings updates fail
  • Consider partial import behavior when some indexes fail in the middle of processing

Context

This issue was identified during review of PR #391 where the settings update timing was changed to resolve timeout issues.

Original PR: #391
Discussion: #391 (comment)

The error handling strategy for partial imports deserves focused discussion separate from the core timeout fix implemented in PR #391.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions