# Multiple ErrorHandler in APM Angular client

**URL:** <https://discuss.elastic.co/t/multiple-errorhandler-in-apm-angular-client/233773>\
**Category:** APM\
**Tags:** rum\
**Created:** [May 21, 2020, 4:35pm UTC](https://discuss.elastic.co/t/multiple-errorhandler-in-apm-angular-client/233773 "2020-05-21T16:35:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniele\_Renda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniele_renda/32/39939_2.png) [@Daniele\_Renda](https://discuss.elastic.co/u/Daniele_Renda)\
**Post date:** [May 21, 2020, 4:35pm UTC](https://discuss.elastic.co/t/multiple-errorhandler-in-apm-angular-client/233773/1 "2020-05-21T16:35:58Z")

</div>

In my Angular application I need to use 2 Error handler, the first one is my custom error handler and second one is the [Elastic error handler](https://www.elastic.co/guide/en/apm/agent/rum-js/current/angular-integration.html). Can I use both?

Right now I see that the last one I register in app.module overwrite the previous one, and it is not possible to use `multi: true` like the interceptor.

```auto
        providers: [
        {
          provide: ErrorHandler,
          useClass: CustomErrorHandler
        },
        {
          provide: ErrorHandler,
          useClass: ApmErrorHandler
        },
      ]

```

Thanks very much

---

<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:** [June 11, 2020, 12:35pm UTC](https://discuss.elastic.co/t/multiple-errorhandler-in-apm-angular-client/233773/2 "2020-06-11T12:35:59Z")

</div>

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