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.