intelica-library-ui 0.1.218 → 0.1.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,7 +89,7 @@ class TermService {
|
|
|
89
89
|
_http = inject(HttpClient);
|
|
90
90
|
_config = inject(ConfigService);
|
|
91
91
|
GetTerms(languageCode, pageRoot) {
|
|
92
|
-
return this._http.get(`${this._config.environment?.
|
|
92
|
+
return this._http.get(`${this._config.environment?.securityPath}/Term/ignore/page/${pageRoot}/language/${languageCode}`);
|
|
93
93
|
}
|
|
94
94
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
95
95
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, providedIn: "root" });
|
|
@@ -408,29 +408,32 @@ const ErrorInterceptor = (req, next) => {
|
|
|
408
408
|
HeaderSettings["PageRoot"] = commonFeatureFlagService.GetPageRoot();
|
|
409
409
|
HeaderSettings["LanguageCode"] = getCookie("language") ?? "";
|
|
410
410
|
HeaderSettings["Environment"] = configService.environment?.environment ?? "";
|
|
411
|
-
HeaderSettings["Access"] = authenticationClientID == "" ? "" : getCookie(authenticationClientID) ?? "";
|
|
411
|
+
HeaderSettings["Access"] = authenticationClientID == "" ? "" : (getCookie(authenticationClientID) ?? "");
|
|
412
412
|
}
|
|
413
413
|
let _request = req.clone({ headers: new HttpHeaders(HeaderSettings) });
|
|
414
414
|
return next(_request).pipe(catchError(handleErrorResponse));
|
|
415
415
|
function handleErrorResponse(error) {
|
|
416
|
-
console.log(error, "error");
|
|
416
|
+
console.log(error, "error", error.status);
|
|
417
417
|
spinnerService.hide();
|
|
418
|
-
|
|
419
|
-
sweetAlertService.messageBox(error.error.message);
|
|
420
|
-
if (error.status == 400)
|
|
421
|
-
sweetAlertService.messageBox(error.error.message);
|
|
422
|
-
if (error.status == 409)
|
|
423
|
-
sweetAlertService.messageBox(error.error.message);
|
|
424
|
-
if (error.status == 401)
|
|
425
|
-
sweetAlertService.messageBox(error.error.message);
|
|
418
|
+
const authenticationLocation = `${configService.environment?.authenticationWeb}?callback=${window.location.href}&clientID=${configService.environment?.clientID}`;
|
|
426
419
|
if (error.status == 503 || error.status == 0)
|
|
427
420
|
sweetAlertService.messageBox("El servicio que se necesita consumir no esta activo o no responde.");
|
|
428
|
-
if (error.status == 405)
|
|
421
|
+
else if (error.status == 405)
|
|
429
422
|
sweetAlertService.messageBox("Los parametros enviados al servicio no coinciden.");
|
|
430
|
-
if (error.status == 404)
|
|
423
|
+
else if (error.status == 404)
|
|
431
424
|
sweetAlertService.messageBox("Recurso no encontrado.");
|
|
425
|
+
else if (error.status == 401) {
|
|
426
|
+
sweetAlertService.messageBox(error.error.Error);
|
|
427
|
+
window.location.href = authenticationLocation;
|
|
428
|
+
}
|
|
429
|
+
else if (error.status == 403) {
|
|
430
|
+
sweetAlertService.messageBox(error.error.Error);
|
|
431
|
+
window.location.href = window.location.origin;
|
|
432
|
+
}
|
|
433
|
+
else
|
|
434
|
+
sweetAlertService.messageBox(error.error.Message);
|
|
432
435
|
return throwError(() => {
|
|
433
|
-
error.error, error.message;
|
|
436
|
+
(error.error, error.message);
|
|
434
437
|
});
|
|
435
438
|
}
|
|
436
439
|
};
|