Skip to content

Http request exceptions captured twice in Angular 9 #2532

Closed
@lujakob

Description

@lujakob

Package + Version

@sentry/browser@5.15.4

Angular Version 9

Description

Implementing Sentry with Angular following the docs captures two event for http requests that return a 401 error.

I implemented a minimal version in Stackblitz

In app.component.ts a request to a protected API throws a 401 error. The console logs show the beforeSend logs having two events captures, also visible in the networks tab.

Replace the sentry init config dsn to use a different Sentry Account to see the logs in sentry.

If Sentry.captureException is outcommented in app.module, still there is one event captured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions