aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-29 09:22:23 +0100
committerChocobozzz <me@florianbigard.com>2017-12-29 09:22:23 +0100
commit80f8e364e1df4005e95c9e207d38d758794e37f6 (patch)
treeeb4db0473019e404009096702ae6cd0b76e5d64c /client/src/app/login/login.component.ts
parenteacf925ea668ba48c30f4e8e3c117d8daaebfe77 (diff)
downloadPeerTube-80f8e364e1df4005e95c9e207d38d758794e37f6.tar.gz
PeerTube-80f8e364e1df4005e95c9e207d38d758794e37f6.tar.zst
PeerTube-80f8e364e1df4005e95c9e207d38d758794e37f6.zip
Use server error message on login
Diffstat (limited to 'client/src/app/login/login.component.ts')
-rw-r--r--client/src/app/login/login.component.ts10
1 files changed, 2 insertions, 8 deletions
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 {
55 const { username, password } = this.form.value 55 const { username, password } = this.form.value
56 56
57 this.authService.login(username, password).subscribe( 57 this.authService.login(username, password).subscribe(
58 result => this.router.navigate(['/videos/list']), 58 () => this.router.navigate(['/videos/list']),
59 59
60 err => { 60 err => this.error = err.message
61 if (err.message === 'invalid_grant') {
62 this.error = 'Credentials are invalid.'
63 } else {
64 this.error = `${err.body.error_description}`
65 }
66 }
67 ) 61 )
68 } 62 }
69} 63}