# Incorrect Error Grouping

**URL:** <https://discuss.elastic.co/t/incorrect-error-grouping/215939>\
**Category:** APM\
**Tags:** nodejs, server\
**Created:** [January 21, 2020, 6:43pm UTC](https://discuss.elastic.co/t/incorrect-error-grouping/215939 "2020-01-21T18:43:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [January 23, 2020, 11:14am UTC](https://discuss.elastic.co/t/incorrect-error-grouping/215939/2 "2020-01-23T11:14:21Z")

</div>

Hi @Matthew_Petrie,  
the APM Server generally supports sending an `error.exception.cause` which should point to the original error. If this information was sent up, the grouping keys would differ based on different `causes`. Unfortunately the nodejs agent does not yet support sending causes.

You were mentioning that error messages differ. If any other information is given, then such messages are not considered in the grouping key logic, to avoid creating unique keys per IDs or names. Since in your case the errors provide a stacktrace the messages are ignored.  
Looking at the [nodejs agent's API](https://www.elastic.co/guide/en/apm/agent/nodejs/2.x/agent-api.html#parameterized-message-object) I was wondering if it were an option for you to send the error `message` as `parameterized message` which would be considered in the grouping key logic.

---

_[View the full topic](https://discuss.elastic.co/t/incorrect-error-grouping/215939)._
