From 77dad64eab7f0e850c2ffb490a88392dd222cb00 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 26 Jun 2021 08:46:22 +0530 Subject: [PATCH] Fix: Login errors were not helpful as error.details NOTICE THE "S" typo gobbled up the error message. Also changed client to device --- bookie/src/app/auth/login/login.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookie/src/app/auth/login/login.component.ts b/bookie/src/app/auth/login/login.component.ts index 2ae1ccd..feeda0b 100644 --- a/bookie/src/app/auth/login/login.component.ts +++ b/bookie/src/app/auth/login/login.component.ts @@ -65,11 +65,11 @@ export class LoginComponent implements OnInit, AfterViewInit { this.router.navigate([this.returnUrl]); }, (error) => { - if (error.status === 401 && error.error.detail === 'Client is not registered') { + if (error.status === 401 && error.error.detail === 'Device is not registered') { this.showOtp = true; - this.clientId = this.cs.getCookie('client_id'); + this.clientId = this.cs.getCookie('device_id'); } - this.toaster.show('Error', error.error.details); + this.toaster.show('Error', error.error.detail); }, ); }