Fix bug in ignoring svr errors in account deletion flow

This commit is contained in:
Katherine 2024-09-13 12:28:31 -04:00 committed by GitHub
parent f60c9f2a15
commit d6e03f50b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -989,14 +989,14 @@ public class AccountsManager {
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()),