mirror of
https://github.com/google/nomulus
synced 2026-02-03 19:42:39 +00:00
Update KMS method signatures to standardize on KeyringException
It came up during the review of [] that it doesn't make a lot of sense for encrypt() and decrypt() to not throw the same kinds of Exceptions, especially not for the same kind of problem, just because one happens to use a Retrier in its internal implementation and the other doesn't. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201054057
This commit is contained in:
@@ -192,7 +192,7 @@ public class KmsKeyring implements Keyring {
|
||||
|
||||
try {
|
||||
return kmsConnection.decrypt(secret.getName(), encryptedData);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
throw new KeyringException(
|
||||
String.format("CloudKMS decrypt operation failed for secret %s", keyName), e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user