@abp/ng.theme.shared 7.2.2 → 7.2.3
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/README.md +129 -2
- package/esm2020/extensions/lib/components/date-time-picker/date-time-picker.component.mjs +2 -2
- package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +2 -2
- package/esm2020/lib/handlers/error.handler.mjs +10 -8
- package/fesm2015/abp-ng.theme.shared-extensions.mjs +2 -2
- package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2015/abp-ng.theme.shared.mjs +9 -7
- package/fesm2015/abp-ng.theme.shared.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared-extensions.mjs +2 -2
- package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared.mjs +9 -7
- package/fesm2020/abp-ng.theme.shared.mjs.map +1 -1
- package/package.json +17 -3
|
@@ -1816,8 +1816,10 @@ class ErrorHandler {
|
|
|
1816
1816
|
this.componentRef = null;
|
|
1817
1817
|
this.httpErrorHandler = this.injector.get(HTTP_ERROR_HANDLER, (_, err) => throwError(err));
|
|
1818
1818
|
this.executeErrorHandler = (error) => {
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1819
|
+
const errHandler = this.httpErrorHandler(this.injector, error);
|
|
1820
|
+
const isObservable = errHandler instanceof Observable;
|
|
1821
|
+
const response = isObservable ? errHandler : of(null);
|
|
1822
|
+
return response.pipe(catchError(err => {
|
|
1821
1823
|
this.handleError(err);
|
|
1822
1824
|
return of(null);
|
|
1823
1825
|
}));
|
|
@@ -1872,6 +1874,10 @@ class ErrorHandler {
|
|
|
1872
1874
|
key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
|
|
1873
1875
|
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
|
|
1874
1876
|
};
|
|
1877
|
+
if (err instanceof HttpErrorResponse && err.headers.get('Abp-Tenant-Resolve-Error')) {
|
|
1878
|
+
this.authService.logout().subscribe();
|
|
1879
|
+
return;
|
|
1880
|
+
}
|
|
1875
1881
|
if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
|
|
1876
1882
|
const confirmation$ = this.showErrorWithRequestBody(body);
|
|
1877
1883
|
if (err.status === 401) {
|
|
@@ -1880,9 +1886,6 @@ class ErrorHandler {
|
|
|
1880
1886
|
});
|
|
1881
1887
|
}
|
|
1882
1888
|
}
|
|
1883
|
-
if (err instanceof HttpErrorResponse && err.headers.get('Abp-Tenant-Resolve-Error')) {
|
|
1884
|
-
this.authService.logout().subscribe();
|
|
1885
|
-
}
|
|
1886
1889
|
else {
|
|
1887
1890
|
switch (err.status) {
|
|
1888
1891
|
case 401:
|
|
@@ -1909,7 +1912,7 @@ class ErrorHandler {
|
|
|
1909
1912
|
status: 403,
|
|
1910
1913
|
});
|
|
1911
1914
|
break;
|
|
1912
|
-
case 404:
|
|
1915
|
+
case 404:
|
|
1913
1916
|
this.canCreateCustomError(404)
|
|
1914
1917
|
? this.show404Page()
|
|
1915
1918
|
: this.showError({
|
|
@@ -1920,7 +1923,6 @@ class ErrorHandler {
|
|
|
1920
1923
|
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
|
|
1921
1924
|
});
|
|
1922
1925
|
break;
|
|
1923
|
-
}
|
|
1924
1926
|
case 500:
|
|
1925
1927
|
this.createErrorComponent({
|
|
1926
1928
|
title: {
|