Browse Source

fix(theme-shared): add HttpErrorResponse instance control to error.handler

pull/3729/head
mehmet-erim 7 years ago
parent
commit
a282a1240a
  1. 2
      npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts

2
npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts

@ -90,7 +90,7 @@ export class ErrorHandler {
.subscribe(err => {
const body = snq(() => err.error.error, DEFAULT_ERROR_MESSAGES.defaultError.title);
if (err.headers.get('_AbpErrorFormat')) {
if (err instanceof HttpErrorResponse && err.headers.get('_AbpErrorFormat')) {
const confirmation$ = this.showError(null, null, body);
if (err.status === 401) {

Loading…
Cancel
Save