Skip to content

Commit

Permalink
Add Sentry Angular ErrorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
trungvose committed Dec 24, 2020
1 parent 4d2efcd commit a06f091
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { ErrorHandler, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Expand All @@ -13,6 +13,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzSpinModule } from 'ng-zorro-antd/spin';
import { QuillModule } from 'ngx-quill';
import { SnowModule } from './core/snow/snow.module';
import * as Sentry from "@sentry/angular";

@NgModule({
declarations: [AppComponent],
Expand All @@ -27,12 +28,17 @@ import { SnowModule } from './core/snow/snow.module';
environment.production ? [] : AkitaNgDevtools,
AkitaNgRouterStoreModule,
QuillModule.forRoot(),
SnowModule
SnowModule
],
providers: [
{
provide: NG_ENTITY_SERVICE_CONFIG,
useValue: { baseUrl: 'https://jsonplaceholder.typicode.com' }
},

{
provide: ErrorHandler,
useValue: Sentry.createErrorHandler()
}
],
bootstrap: [AppComponent]
Expand Down

0 comments on commit a06f091

Please sign in to comment.