# Kibana Visualization error \>\> Esaags error - Bad Request

**URL:** <https://discuss.elastic.co/t/kibana-visualization-error-esaags-error-bad-request/297448>\
**Category:** Kibana\
**Created:** [February 17, 2022, 7:50am UTC](https://discuss.elastic.co/t/kibana-visualization-error-esaags-error-bad-request/297448 "2022-02-17T07:50:20Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [February 22, 2022, 11:01am UTC](https://discuss.elastic.co/t/kibana-visualization-error-esaags-error-bad-request/297448/5 "2022-02-22T11:01:27Z")

</div>

Can it be the same problem as here? "every log has the same field. I have added a condition to check whether there is that field and this is solved."

> [@Kibana scripted field (bad request error)](https://discuss.elastic.co/t/kibana-scripted-field-bad-request-error/238767):
>
> Hi, so I added a scripted field in one of the index pattern. I am pretty sure the code should work fine. return doc['sequence'].value % 2 When I previewed the results, it works fine. However, when I tried to view it in Discover, it said "error loading data, [script\_exception] runtime error" Below are the full error descriptions Error: Bad Request at Fetch.\_callee3$ ([http://localhost:5601/bundles/commons.bundle.js:3:4001197](http://localhost:5601/bundles/commons.bundle.js:3:4001197)) at l ([http://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-sha…](http://localhost:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:970406)

---

_[View the full topic](https://discuss.elastic.co/t/kibana-visualization-error-esaags-error-bad-request/297448)._
