# Catched library exception still marked as Exception in APM UI

**URL:** <https://discuss.elastic.co/t/catched-library-exception-still-marked-as-exception-in-apm-ui/337201>\
**Category:** APM\
**Tags:** java\
**Created:** [June 29, 2023, 1:20pm UTC](https://discuss.elastic.co/t/catched-library-exception-still-marked-as-exception-in-apm-ui/337201 "2023-06-29T13:20:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NickWe](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@NickWe](https://discuss.elastic.co/u/NickWe)\
**Post date:** [June 29, 2023, 1:20pm UTC](https://discuss.elastic.co/t/catched-library-exception-still-marked-as-exception-in-apm-ui/337201/1 "2023-06-29T13:20:43Z")

</div>

Hi,

Is it normal that catched Exceptions in a Library are still shown as Errors in the APM UI. I could not find any relevant documentation about when/how Exceptions are sent by the APM Java agent.

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/7/576d20c303d2f289ff42dc10573d7922596d9a65.png)

In this case it's the following code that throws the Exception but it is caught in the same method body.

> <https://github.com/apache/tika/blob/main/tika-core/src/main/java/org/apache/tika/parser/external/ExternalParser.java#L154>

How does the agent determine the Java exceptions to send to the APM server? I know about ignore\_exceptions but unfortunately in this case an IOException is thrown which is too generic to ignore.

Best regards,  
Nick

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [July 13, 2023, 1:58pm UTC](https://discuss.elastic.co/t/catched-library-exception-still-marked-as-exception-in-apm-ui/337201/2 "2023-07-13T13:58:40Z")

</div>

My colleague Sylvain has a [nice explanation](https://discuss.elastic.co/t/not-all-errors-exceptions-are-reported-by-the-java-apm-agent/260157/2). I think you would need to [exclude](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-disable-instrumentations) `process` from the instrumentation to avoid this one

---

<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:** [August 10, 2023, 1:59pm UTC](https://discuss.elastic.co/t/catched-library-exception-still-marked-as-exception-in-apm-ui/337201/3 "2023-08-10T13:59:38Z")

</div>

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