Skip to content

Commit

Permalink
Fix bug in ignoring svr errors in account deletion flow
Browse files Browse the repository at this point in the history
  • Loading branch information
katherine-signal authored Sep 13, 2024
1 parent f60c9f2 commit d6e03f5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -989,14 +989,14 @@ private CompletableFuture<Void> delete(final Account account) {
device.getId())))
.toList();
CompletableFuture<Void> deleteBackupFuture = secureValueRecovery2Client.deleteBackups(account.getUuid())
.exceptionally(exception -> {
.exceptionally(ExceptionUtils.exceptionallyHandler(SecureValueRecoveryException.class, exception -> {
final List<String> svrStatusCodesToIgnore = dynamicConfigurationManager.getConfiguration().getSvrStatusCodesToIgnoreForAccountDeletion();
if (exception instanceof SecureValueRecoveryException e && svrStatusCodesToIgnore.contains(e.getStatusCode())) {
if (svrStatusCodesToIgnore.contains(exception.getStatusCode())) {
logger.warn("Failed to delete backup for account: " + account.getUuid(), exception);
return null;
}
throw new CompletionException(exception);
});
}));

return CompletableFuture.allOf(
secureStorageClient.deleteStoredData(account.getUuid()),
Expand Down

0 comments on commit d6e03f5

Please sign in to comment.