# RestHighLevelClient catching IndexNotFoundException

**URL:** <https://discuss.elastic.co/t/resthighlevelclient-catching-indexnotfoundexception/177339>\
**Category:** Elasticsearch\
**Created:** [April 17, 2019, 4:02pm UTC](https://discuss.elastic.co/t/resthighlevelclient-catching-indexnotfoundexception/177339 "2019-04-17T16:02:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gormanst](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@gormanst](https://discuss.elastic.co/u/gormanst)\
**Post date:** [April 17, 2019, 4:02pm UTC](https://discuss.elastic.co/t/resthighlevelclient-catching-indexnotfoundexception/177339/1 "2019-04-17T16:02:22Z")

</div>

I have searched around looking for the right way to catch this exception from the RestHighLevelClient. When my cluster comes up there are no indexes initially. I don't want to change this behavior. I could like to capture the IndexNotFoundException and log it. Can the RestHighLevelClient do that, it seems to only throw IOExceptions

---

<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:** [May 15, 2019, 4:02pm UTC](https://discuss.elastic.co/t/resthighlevelclient-catching-indexnotfoundexception/177339/2 "2019-05-15T16:02:38Z")

</div>

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