@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.
@@ -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 returnValue = this.httpErrorHandler(this.injector, error);
1820
- return (returnValue instanceof Observable ? returnValue : of(null)).pipe(catchError(err => {
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: {