diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index dfede5924..e7c9c7226 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts @@ -55,15 +55,9 @@ export class LoginComponent extends FormReactive implements OnInit { const { username, password } = this.form.value this.authService.login(username, password).subscribe( - result => this.router.navigate(['/videos/list']), + () => this.router.navigate(['/videos/list']), - err => { - if (err.message === 'invalid_grant') { - this.error = 'Credentials are invalid.' - } else { - this.error = `${err.body.error_description}` - } - } + err => this.error = err.message ) } }