Introduce configurable way to ignore SVR errors in the account deletion flow

This commit is contained in:
Katherine
2024-09-13 10:57:09 -04:00
committed by GitHub
parent f4b94a7a89
commit bd57c1c7e7
12 changed files with 81 additions and 15 deletions

View File

@@ -72,7 +72,7 @@ public class SecureValueRecovery2Client {
return null;
}
throw new SecureValueRecoveryException("Failed to delete backup: " + response.statusCode());
throw new SecureValueRecoveryException("Failed to delete backup", String.valueOf(response.statusCode()));
});
}

View File

@@ -6,8 +6,14 @@
package org.whispersystems.textsecuregcm.securevaluerecovery;
public class SecureValueRecoveryException extends RuntimeException {
private final String statusCode;
public SecureValueRecoveryException(final String message) {
public SecureValueRecoveryException(final String message, final String statusCode) {
super(message);
this.statusCode = statusCode;
}
public String getStatusCode() {
return statusCode;
}
}