Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
delete cipher on sync if it 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Aug 22, 2018
1 parent 686597a commit 46e35a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 46e35a9

Please sign in to comment.