import { BrowserModule } from "@angular/platform-browser"; import { NgModule, ErrorHandler, Injectable } from "@angular/core"; import * as Sentry from "@sentry/browser"; import { DyCommon, NotificationType } from "../Common"; Sentry.init({ dsn: "https://e3993c97d1604816b96f8f245e76ac99@sentry.io/248140" }); @Injectable() export class SentryErrorHandler implements ErrorHandler { constructor() { } handleError(error) { if (error != undefined) { const eventId = Sentry.captureException(error.originalError || error); console.error(error.originalError || error); } //Sentry.showReportDialog({ eventId }); //DyCommon.addNotification(NotificationType.Error,"there was an error") } }