@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
|
@@ -1807,8 +1807,10 @@ class ErrorHandler {
|
|
|
1807
1807
|
this.componentRef = null;
|
|
1808
1808
|
this.httpErrorHandler = this.injector.get(HTTP_ERROR_HANDLER, (_, err) => throwError(err));
|
|
1809
1809
|
this.executeErrorHandler = (error) => {
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1810
|
+
const errHandler = this.httpErrorHandler(this.injector, error);
|
|
1811
|
+
const isObservable = errHandler instanceof Observable;
|
|
1812
|
+
const response = isObservable ? errHandler : of(null);
|
|
1813
|
+
return response.pipe(catchError(err => {
|
|
1812
1814
|
this.handleError(err);
|
|
1813
1815
|
return of(null);
|
|
1814
1816
|
}));
|
|
@@ -1860,6 +1862,10 @@ class ErrorHandler {
|
|
|
1860
1862
|
key: DEFAULT_ERROR_LOCALIZATIONS.defaultError.title,
|
|
1861
1863
|
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError.title,
|
|
1862
1864
|
};
|
|
1865
|
+
if (err instanceof HttpErrorResponse && err.headers.get('Abp-Tenant-Resolve-Error')) {
|
|
1866
|
+
this.authService.logout().subscribe();
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1863
1869
|
if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
|
|
1864
1870
|
const confirmation$ = this.showErrorWithRequestBody(body);
|
|
1865
1871
|
if (err.status === 401) {
|
|
@@ -1868,9 +1874,6 @@ class ErrorHandler {
|
|
|
1868
1874
|
});
|
|
1869
1875
|
}
|
|
1870
1876
|
}
|
|
1871
|
-
if (err instanceof HttpErrorResponse && err.headers.get('Abp-Tenant-Resolve-Error')) {
|
|
1872
|
-
this.authService.logout().subscribe();
|
|
1873
|
-
}
|
|
1874
1877
|
else {
|
|
1875
1878
|
switch (err.status) {
|
|
1876
1879
|
case 401:
|
|
@@ -1897,7 +1900,7 @@ class ErrorHandler {
|
|
|
1897
1900
|
status: 403,
|
|
1898
1901
|
});
|
|
1899
1902
|
break;
|
|
1900
|
-
case 404:
|
|
1903
|
+
case 404:
|
|
1901
1904
|
this.canCreateCustomError(404)
|
|
1902
1905
|
? this.show404Page()
|
|
1903
1906
|
: this.showError({
|
|
@@ -1908,7 +1911,6 @@ class ErrorHandler {
|
|
|
1908
1911
|
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
|
|
1909
1912
|
});
|
|
1910
1913
|
break;
|
|
1911
|
-
}
|
|
1912
1914
|
case 500:
|
|
1913
1915
|
this.createErrorComponent({
|
|
1914
1916
|
title: {
|