backend: Add missing error logging for ElasticSearch indexing failures
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 755
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
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.phpopenml_OS/models/api/v1/Api_flow.php(2 locations)openml_OS/models/api/v1/Api_run.phpopenml_OS/models/api/v1/Api_study.phpopenml_OS/libraries/ElasticSearch.php(2 locations)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the empty catch blocks and TODO comments in openml_OS/models/api/v1/Api_data.php, Api_flow.php, Api_run.php, Api_study.php, and openml_OS/libraries/ElasticSearch.php. Start by comparing the surrounding indexing flows and existing CodeIgniter logging usage. Done means each listed indexing failure records an error through log_message('error', ...) instead of being silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, php
- Domain
- backend, observability, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100