@@ -133,7 +133,7 @@ export class ClientRepository {
133
133
const status = error . response ?. status ;
134
134
const clientNotFoundBackend = status === HTTP_STATUS . NOT_FOUND ;
135
135
if ( clientNotFoundBackend ) {
136
- this . logger . warn ( `Local client ' ${ clientId } ' no longer exists on the backend` , error ) ;
136
+ this . logger . warn ( `Local client no longer exists on the backend` , error ) ;
137
137
throw new ClientError ( ClientError . TYPE . NO_VALID_CLIENT , ClientError . MESSAGE . NO_VALID_CLIENT ) ;
138
138
}
139
139
@@ -246,8 +246,7 @@ export class ClientRepository {
246
246
async getValidLocalClient ( ) : Promise < ko . Observable < ClientEntity > > {
247
247
try {
248
248
const clientEntity = await this . getCurrentClientFromDb ( ) ;
249
- const clientPayload = await this . getClientByIdFromBackend ( clientEntity . id ) ;
250
- this . logger . info ( `Client with ID '${ clientPayload . id } ' (${ clientPayload . type } ) validated on backend` ) ;
249
+ await this . getClientByIdFromBackend ( clientEntity . id ) ;
251
250
const currentClient = this . clientState . currentClient ;
252
251
253
252
await this . clientService . putClientCapabilities ( currentClient ( ) . id , {
@@ -374,7 +373,6 @@ export class ClientRepository {
374
373
* @returns Resolves with all locally known clients except the current one
375
374
*/
376
375
async getClientsForSelf ( ) : Promise < ClientEntity [ ] > {
377
- this . logger . info ( 'Retrieving all clients of the self user from database' ) ;
378
376
const { domain, id} = this . selfUser ( ) ;
379
377
const clientRecords = await this . getClientByUserIdFromDb ( { domain, id} ) ;
380
378
const clientEntities = ClientMapper . mapClients ( clientRecords , true , domain ) ;
@@ -444,15 +442,15 @@ export class ClientRepository {
444
442
delete clientsFromBackend [ clientId ] ;
445
443
446
444
if ( this . clientState . currentClient ( ) && this . isCurrentClient ( userId , clientId ) ) {
447
- this . logger . warn ( `Removing duplicate self client ' ${ clientId } ' locally ` ) ;
445
+ this . logger . warn ( `Removing duplicate local self client` ) ;
448
446
await this . removeClient ( userId , clientId ) ;
449
447
}
450
448
451
449
// Locally known client changed on backend
452
450
if ( wasUpdated ) {
453
451
// Clear the previous client in DB (in case the domain changes the primary key will also change, thus invalidating the previous client)
454
452
await this . clientService . deleteClientFromDb ( client . meta . primary_key ) ;
455
- this . logger . info ( `Updating client ' ${ clientId } ' of user ' ${ userId . id } ' locally ` ) ;
453
+ this . logger . info ( `Updating local client ` ) ;
456
454
promises . push ( this . saveClientInDb ( userId , client ) ) ;
457
455
continue ;
458
456
}
@@ -463,7 +461,7 @@ export class ClientRepository {
463
461
}
464
462
465
463
// Locally known client deleted on backend
466
- this . logger . warn ( `Removing client ' ${ clientId } ' of user ' ${ userId . id } ' locally ` ) ;
464
+ this . logger . warn ( `Removing local client ` ) ;
467
465
await this . removeClient ( userId , clientId ) ;
468
466
}
469
467
@@ -475,7 +473,7 @@ export class ClientRepository {
475
473
}
476
474
477
475
// Locally unknown client new on backend
478
- this . logger . debug ( `New client ' ${ clientId } ' of user ' ${ userId . id } ' will be stored locally` ) ;
476
+ this . logger . debug ( `New client will be stored locally` ) ;
479
477
if ( matchQualifiedIds ( this . selfUser ( ) , userId ) ) {
480
478
this . onClientAdd ( { client : clientPayload as RegisteredClient } ) ;
481
479
}
@@ -541,7 +539,7 @@ export class ClientRepository {
541
539
* @param eventJson JSON data of 'user.client-add' event
542
540
*/
543
541
private onClientAdd ( eventJson : Pick < UserClientAddEvent , 'client' > ) : void {
544
- this . logger . debug ( 'Client of self user added' , eventJson ) ;
542
+ this . logger . debug ( 'Client of self user added' ) ;
545
543
amplify . publish ( WebAppEvents . CLIENT . ADD , this . selfUser ( ) . qualifiedId , eventJson . client , true ) ;
546
544
}
547
545
0 commit comments