Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Throw exception if any record fails and Log the response - #213

Open
clovenlife wants to merge 1 commit into
babenkoivan:masterfrom
clovenlife:Bulk-index-fails-silently-#186
Open

Throw exception if any record fails and Log the response#213
clovenlife wants to merge 1 commit into
babenkoivan:masterfrom
clovenlife:Bulk-index-fails-silently-#186

Conversation

@clovenlife

Copy link
Copy Markdown

Attempting to resolve the
https://github.com/babenkoivan/scout-elasticsearch-driver/issues/186
ElasticSearch will return 200 regardless if a record failed with bulk loading, so I'm checking the response for an errors property and if it exists, iterate through all the items return to find the item that caused the error, log them, and throw an exception.

@iget-esoares

Copy link
Copy Markdown
Collaborator

Can you add a more eloquent log message and exception message?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants