# Whats is the repose code for bulk rejections?

**URL:** <https://discuss.elastic.co/t/whats-is-the-repose-code-for-bulk-rejections/88376>\
**Category:** Elasticsearch\
**Created:** [June 6, 2017, 8:42am UTC](https://discuss.elastic.co/t/whats-is-the-repose-code-for-bulk-rejections/88376 "2017-06-06T08:42:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)\
**Post date:** [June 6, 2017, 8:42am UTC](https://discuss.elastic.co/t/whats-is-the-repose-code-for-bulk-rejections/88376/1 "2017-06-06T08:42:29Z")

</div>

Hi All,

Based on my node stats below is the bulk rejections

> ```
> thread_pool: {
> bulk: {
> threads: 32,
> queue: 0,
> active: 0,
> rejected: 50033,
> largest: 32,
> completed: 80744
> }
> 
> ```

As far as I understand when there is a bulk reject, then all the documents that are the part of the bulk request would have failed. In that case what would be the response code or response from ES ? How can we differentiate the bulk rejection errors from few docs errors in bulk.

Will it be like normal ES bulk response as shown below for example

> {  
> "took": 3,  
> "errors": true,  
> "items": [  
> { "create": {  
> "\_index": "website",  
> "\_type": "blog",  
> "\_id": "123",  
> "status": 409,  
> "error": "DocumentAlreadyExistsException  
> [[website][4] [blog][123]:  
> document already exists]"  
> }},  
> { "index": {  
> "\_index": "website",  
> "\_type": "blog",  
> "\_id": "123",  
> "\_version": 5,  
> "status": 200  
> }}  
> ]  
> }

I am not using any es native clients to perform bulk requests. using regular http libs to make the rest call.

---

<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:** [July 4, 2017, 8:42am UTC](https://discuss.elastic.co/t/whats-is-the-repose-code-for-bulk-rejections/88376/2 "2017-07-04T08:42:49Z")

</div>

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