From e0e88ce89181dc573e7419034414738125aee1dc Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 9 Jan 2019 17:44:31 +0100 Subject: [PATCH] fix login not responding to errors --- .../components/login-mask/login-mask.component.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/client/src/app/site/login/components/login-mask/login-mask.component.ts b/client/src/app/site/login/components/login-mask/login-mask.component.ts index a52b3e537..600bcce6c 100644 --- a/client/src/app/site/login/components/login-mask/login-mask.component.ts +++ b/client/src/app/site/login/components/login-mask/login-mask.component.ts @@ -7,7 +7,6 @@ import { OperatorService } from 'app/core/services/operator.service'; import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material'; import { FormGroup, Validators, FormBuilder } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; -import { HttpErrorResponse } from '@angular/common/http'; import { environment } from 'environments/environment'; import { OpenSlidesService } from '../../../../core/services/openslides.service'; import { LoginDataService } from '../../../../core/services/login-data.service'; @@ -141,13 +140,11 @@ export class LoginMaskComponent extends BaseComponent implements OnInit, OnDestr } this.router.navigate([redirect]); } catch (e) { - if (e instanceof HttpErrorResponse) { - this.loginForm.setErrors({ - notFound: true - }); - this.loginErrorMsg = e.error.detail; - this.inProcess = false; - } + this.loginForm.setErrors({ + notFound: true + }); + this.loginErrorMsg = e; + this.inProcess = false; } }