Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

Sentry.captureException not working in an Angular app #29

@tangerinegit

Description

@tangerinegit

Here is my code:

app.module.ts:

import { SentryModule } from 'nativescript-sentry/angular';

@NgModule({
    bootstrap: [
        AppComponent
    ],
    imports: [
        SentryModule.forRoot({ dsn: 'https://<code>:<code>@sentry.io/<project_id>' })
    ],
})
export class AppModule {}

GlobalErrorHandler.ts

import { ErrorHandler, Injectable } from '@angular/core';
import { Sentry } from 'nativescript-sentry';

@Injectable()
export class GlobalErrorHandler implements ErrorHandler {
    constructor() { }
    handleError(error) {
        Sentry.captureException(error, { });
        throw error;
    }
}

When I throw a test error, the app crashes, the code in the global error handler executes, but when I log in to our dashboard in Sentry.io, I do not see any events logged.

Am I missing anything in the setup?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions