# Getting records rejected during bulk insert, which are not related to the '400 Failed to parse' reason

**URL:** <https://discuss.elastic.co/t/getting-records-rejected-during-bulk-insert-which-are-not-related-to-the-400-failed-to-parse-reason/228695>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [April 19, 2020, 3:20am UTC](https://discuss.elastic.co/t/getting-records-rejected-during-bulk-insert-which-are-not-related-to-the-400-failed-to-parse-reason/228695 "2020-04-19T03:20:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusuku](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gusuku/32/47141_2.png) [@gusuku](https://discuss.elastic.co/u/gusuku)\
**Post date:** [April 19, 2020, 3:20am UTC](https://discuss.elastic.co/t/getting-records-rejected-during-bulk-insert-which-are-not-related-to-the-400-failed-to-parse-reason/228695/1 "2020-04-19T03:20:31Z")

</div>

Using Bulk API to upsert mini-batches of records to Elasticsearch 5.1

When I try to upsert a badly formatted record (hence getting a `400 Failed to parse`), most times ES rejects just that record in that batch. But _sometimes_, ES rejects that record _as well as_ other records in that batch that do not have that issue (confirmed by successfully upserting those records in a different batch).

Is this expected?  
How to understand this inconsistent behavior?

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [May 14, 2020, 8:26pm UTC](https://discuss.elastic.co/t/getting-records-rejected-during-bulk-insert-which-are-not-related-to-the-400-failed-to-parse-reason/228695/2 "2020-05-14T20:26:01Z")

</div>

Huh, this is interesting. I seem to recall there being a slightly similar issue logged about Bulk endpoint in the Elasticsearch project. Do you have any example records you could share that would reproduce the error?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 11, 2020, 8:26pm UTC](https://discuss.elastic.co/t/getting-records-rejected-during-bulk-insert-which-are-not-related-to-the-400-failed-to-parse-reason/228695/3 "2020-06-11T20:26:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
