MINOR - Secrets Manager server logging (#21325)

This commit is contained in:
Pere Miquel Brull 2025-05-20 19:52:36 +02:00 committed by GitHub
parent 3830e79f52
commit 1a9a9156b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -356,10 +356,12 @@ public abstract class SecretsManager {
} }
return toEncryptObject; return toEncryptObject;
} catch (Exception e) { } catch (Exception e) {
throw new SecretsManagerException( String msg =
String.format( String.format(
"Error trying to encrypt object with secret ID [%s] due to [%s]", "Error trying to encrypt object with secret ID [%s] due to [%s]",
secretId, e.getMessage())); secretId, e.getMessage());
LOG.error(msg);
throw new SecretsManagerException(msg);
} }
} }
@ -390,6 +392,7 @@ public abstract class SecretsManager {
}); });
return toDecryptObject; return toDecryptObject;
} catch (Exception e) { } catch (Exception e) {
LOG.error("Error trying to decrypt object due to [{}]", e.getMessage());
throw new SecretsManagerException( throw new SecretsManagerException(
String.format( String.format(
"Error trying to decrypt object [%s] due to [%s]", "Error trying to decrypt object [%s] due to [%s]",