mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
post error to sentry added to longin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, ErrorHandler } from '@angular/core';
|
||||
import { StorageService } from './storage.service';
|
||||
import { HttpClient, HttpHeaders, HttpEventType } from '@angular/common/http';
|
||||
import { LoginUserRespose, UserForm, UserSession } from '../models/user.model';
|
||||
@@ -19,6 +19,7 @@ import { InitialsService } from './functions/initials.service';
|
||||
import { PermissionService } from './permission.service';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { captureException } from '@sentry/angular';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -46,7 +47,8 @@ export class AuthService {
|
||||
private initialsService: InitialsService,
|
||||
public p: PermissionService,
|
||||
public ChatSystemService: ChatSystemService,
|
||||
private httpErroHandle: HttpErrorHandle) {
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private errorHandler: ErrorHandler) {
|
||||
|
||||
if (SessionStore.exist) {
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access) == true ) {
|
||||
@@ -93,7 +95,9 @@ export class AuthService {
|
||||
this.SetSession(response, user)
|
||||
}
|
||||
} catch (error) {
|
||||
this.errorHandler.handleError(error);
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
captureException(error);
|
||||
} finally {
|
||||
return response
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user