Skip to content

backend: Add missing error logging for ElasticSearch indexing failures #1297

Description

@NAME-ASHWANIYADAV

Description

Currently, several API models and the ElasticSearch library contain empty catch blocks that silently swallow exceptions during ElasticSearch indexing (e.g., when uploading datasets, flows, runs, or studies). These blocks contain // TODO: should log comments left by maintainers.

Silently ignoring these exceptions makes it difficult to diagnose why certain entities fail to appear in ElasticSearch indices in production.

We should replace these empty catch blocks with CodeIgniter's log_message('error', ...) function so that indexing failures are properly recorded in the system logs.

Files needing updates:

  • openml_OS/models/api/v1/Api_data.php
  • openml_OS/models/api/v1/Api_flow.php (2 locations)
  • openml_OS/models/api/v1/Api_run.php
  • openml_OS/models/api/v1/Api_study.php
  • openml_OS/libraries/ElasticSearch.php (2 locations)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions