Angular 岗哨在本地主机(serve)上工作,但不在服务器(build)上工作
我想和8号哨兵一起工作 它工作得很好,在localhost中提供服务时捕获错误事件,而不是在服务器上的构建中 想知道为什么/我错过了什么区别吗Angular 岗哨在本地主机(serve)上工作,但不在服务器(build)上工作,angular,sentry,Angular,Sentry,我想和8号哨兵一起工作 它工作得很好,在localhost中提供服务时捕获错误事件,而不是在服务器上的构建中 想知道为什么/我错过了什么区别吗 //app.module.ts Sentry.init({ integrations: [new Sentry.Integrations.Breadcrumbs({ console: false })], dsn: "https://somecode@o386725.ingest.sentry.io/sometoken
//app.module.ts
Sentry.init({
integrations: [new Sentry.Integrations.Breadcrumbs({
console: false
})],
dsn: "https://somecode@o386725.ingest.sentry.io/sometoken"
});
@Injectable()
export class SentryErrorHandler implements ErrorHandler {
constructor() {}
handleError(error) {
const eventId = Sentry.captureException(error.originalError || error);
Sentry.showReportDialog({ eventId });
}
}
//later added to providers
{ provide: ErrorHandler, useClass: SentryErrorHandler }