@arsedizioni/ars-utils 18.2.505 → 18.2.507
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.
- package/esm2022/clipper.common/common/interceptors/auth.interceptor.mjs +19 -17
- package/esm2022/evolution.common/common/interceptors/auth.interceptor.mjs +1 -2
- package/esm2022/support.common/common/interceptors/auth.interceptor.mjs +19 -17
- package/esm2022/ui.application/ui/components/filter-bar/filter-bar.component.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +18 -16
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +0 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +18 -16
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +2 -2
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -2934,22 +2934,24 @@ class ClipperAuthInterceptor {
|
|
|
2934
2934
|
request = request.clone({ withCredentials: true });
|
|
2935
2935
|
return next.handle(this.addTokenToRequest(request))
|
|
2936
2936
|
.pipe(finalize(() => this.dialogService.clearBusy()), catchError$1(error => {
|
|
2937
|
-
if (error
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
this.lastErrorTime
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2937
|
+
if (error.url.startsWith(this.clipperService.serviceUri)) {
|
|
2938
|
+
if (error instanceof HttpErrorResponse &&
|
|
2939
|
+
!request.url.includes("/login") &&
|
|
2940
|
+
error.status === 401) {
|
|
2941
|
+
return this.handle401Error(request, next);
|
|
2942
|
+
}
|
|
2943
|
+
const errorStatus = parseInt(error.status ?? "0");
|
|
2944
|
+
if ((errorStatus > 0 && errorStatus < 500) || (this.clipperService.flags & ClipperServiceFlags.NotifySystemErrors) > 0) {
|
|
2945
|
+
const errorTime = new Date().getTime();
|
|
2946
|
+
if (errorTime - this.lastErrorTime > 5000) {
|
|
2947
|
+
this.lastErrorTime = errorTime;
|
|
2948
|
+
const invalidSession = errorStatus === 403;
|
|
2949
|
+
this.dialogService.error("<p>" + (error.error?.message ?? error.message ?? "Impossibile eseguire l'operazione richiesta.").replaceAll("\r\n", "</p><p>") + "</p>", null, "Errore in Clipper", undefined, undefined, invalidSession ? 5000 : 15000).afterClosed().subscribe(() => {
|
|
2950
|
+
if (invalidSession) {
|
|
2951
|
+
this.broadcastService.sendMessage(ClipperMessages.LOGOUT);
|
|
2952
|
+
}
|
|
2953
|
+
});
|
|
2954
|
+
}
|
|
2953
2955
|
}
|
|
2954
2956
|
}
|
|
2955
2957
|
return throwError(() => error);
|