delete cipher on sync if it 404s

This commit is contained in:
Kyle Spearrin 2018-08-21 23:10:12 -04:00
parent 686597ab53
commit 46e35a9b84
1 changed files with 7 additions and 1 deletions

View File

@ -177,7 +177,13 @@ export class SyncService implements SyncServiceAbstraction {
return this.syncCompleted(true);
}
}
} catch { }
} catch (e) {
if (e != null && e.statusCode === 404 && isEdit) {
await this.cipherService.delete(notification.id);
this.messagingService.send('syncedDeletedCipher', { cipherId: notification.id });
return this.syncCompleted(true);
}
}
}
return this.syncCompleted(false);
}