# Huge HTTP error responses with malformed queries?

**URL:** <https://discuss.elastic.co/t/huge-http-error-responses-with-malformed-queries/40530>\
**Category:** Elasticsearch\
**Created:** [January 29, 2016, 11:04pm UTC](https://discuss.elastic.co/t/huge-http-error-responses-with-malformed-queries/40530 "2016-01-29T23:04:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![burtonator](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/burtonator/32/44790_2.png) [@burtonator](https://discuss.elastic.co/u/burtonator)\
**Post date:** [January 29, 2016, 11:04pm UTC](https://discuss.elastic.co/t/huge-http-error-responses-with-malformed-queries/40530/1 "2016-01-29T23:04:38Z")

</div>

If a user submits a query that is malformed, they get a JSON response. The problem is that we have a LARGE number of boxes so the HTTP 500 response is about 10MB.

Is there a way to make the response smaller? I think we'd be happy with the response from the first shard/host with the error there.

We were thinking of adding a servlet filter in between the client and user but this is extra work...

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 29, 2016, 11:23pm UTC](https://discuss.elastic.co/t/huge-http-error-responses-with-malformed-queries/40530/2 "2016-01-29T23:23:40Z")

</div>

There's not within ES.

---

<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 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/huge-http-error-responses-with-malformed-queries/40530/3 "2017-07-05T23:20:14Z")

</div>

Closed on July 5, 2017, 11:20pm UTC


