# \[Java Agent\] the http transaction showing in kibana has something wrong with the http status code

**URL:** <https://discuss.elastic.co/t/java-agent-the-http-transaction-showing-in-kibana-has-something-wrong-with-the-http-status-code/219454>\
**Category:** APM\
**Tags:** java\
**Created:** [February 15, 2020, 1:58am UTC](https://discuss.elastic.co/t/java-agent-the-http-transaction-showing-in-kibana-has-something-wrong-with-the-http-status-code/219454 "2020-02-15T01:58:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoderLan](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@CoderLan](https://discuss.elastic.co/u/CoderLan)\
**Post date:** [February 15, 2020, 1:58am UTC](https://discuss.elastic.co/t/java-agent-the-http-transaction-showing-in-kibana-has-something-wrong-with-the-http-status-code/219454/1 "2020-02-15T01:58:38Z")

</div>

the problem is none of business with the kibana or browser, just java agent

**Steps to reproduce** :

1. create a spring web project, and create a controller mapping to any http request
2. the controller will throw an any custom excpetion, and handle it by spring ExceptionHandler(for example @ControllerAdvise and @ExceptionHandler), and return error message with http status code: 200
3. start the http server and invoke the http api, the response is expected (http status code: 200)

but in kibaba, the transaction 's status code is showing as 500.

an issue is related : [https://github.com/elastic/apm-agent-java/issues/1036](https://github.com/elastic/apm-agent-java/issues/1036)

in my opinion: the code ( ServletTransactionHelper#doOnAfter) change the status to 500 because of the exception, but some exception can be ignore because the application already handled it.

so i think the agent should check if it should be ignore by the CoreConfiguration: ignore\_exceptions!

---

<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:** [March 6, 2020, 10:07pm UTC](https://discuss.elastic.co/t/java-agent-the-http-transaction-showing-in-kibana-has-something-wrong-with-the-http-status-code/219454/2 "2020-03-06T22:07:08Z")

</div>

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