Handle exceptions from ingestion server's calls to Elasticsearch #3437
Labels
💻 aspect: code
Concerns the software code in the repository
🛠 goal: fix
Bug fix
help wanted
Open to participation from the community
🟩 priority: low
Low priority and doesn't need to be rushed
🧱 stack: ingestion server
Related to the ingestion/data refresh server
🐍 tech: python
Involves Python
🐛 tooling: sentry
Sentry issue
Description
Handle exceptions from ingestion server's calls to Elasticsearch.
Example
The following calls to Elasticsearch to create a new index can raise an exception, if that index already exists.
openverse/ingestion_server/ingestion_server/indexer.py
Lines 302 to 305 in 46b6b93
openverse/ingestion_server/ingestion_server/indexer.py
Lines 499 to 502 in 46b6b93
This exception is not handled in the code. It should be captured and should mark the appropriate task as 'succeeded' in this particular case because the task is idempotent and the index has been created.
Additional context
This exception was captured by Sentry.
The text was updated successfully, but these errors were encountered: