SUPPORT-8897: Fix

This commit is contained in:
Eduard Tihomirov 2025-02-20 11:06:40 +03:00
parent 07b26219a7
commit e1f155971c

View file

@ -2,7 +2,7 @@ import {Injectable} from "@angular/core";
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from "@angular/router";
import {Observable} from "rxjs";
import {HttpClient, HttpParams} from "@angular/common/http";
import {MessagesService, ErrorMessageService} from "@webbpm/base-package";
import {MessagesService} from "@webbpm/base-package";
import {AuthenticationService} from "../authentication.service";
import {EsiaErrorDetail} from "../EsiaErrorDetail";
@ -13,8 +13,7 @@ export abstract class AuthGuard implements CanActivate {
protected router: Router,
private httpClient: HttpClient,
private authenticationService: AuthenticationService,
private messageService: MessagesService,
private errorMessageService: ErrorMessageService
private messageService: MessagesService
) {
}
@ -49,7 +48,7 @@ export abstract class AuthGuard implements CanActivate {
? reason.error.messages
: reason.error.replaceAll('\\', '');
if (error) {
errorMessage = this.errorMessageService.getErrorMessage();
errorMessage = this.messageService.getUnknowErrorMessage();
let errorCode = this.extractCode(errorDescription);
if (errorCode) {
errorMessage = EsiaErrorDetail.getDescription(errorCode);