Copilot commented on code in PR #13190:
URL: https://github.com/apache/cloudstack/pull/13190#discussion_r3273731082
##########
framework/config/src/main/java/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java:
##########
@@ -174,7 +174,17 @@ public boolean update(String name, String category, String
value) {
@Override
public String getValue(String name) {
ConfigurationVO config = findByName(name);
- return (config == null) ? null : config.getValue();
+ if (config == null) {
+ return null;
+ }
+ try {
+ return config.getValue();
+ } catch (CloudRuntimeException ex) {
+ logger.error("Unable to get global configuration {}: {}. " +
+ "We expect the value of setting to be encrypted in the
database with the Management Server's key, " +
+ "but we were unable to decrypt it using this key", name,
ex.getMessage());
Review Comment:
The error log drops the exception stack trace by logging only
`ex.getMessage()`. For decryption failures (or missing/incorrect secret key),
the stack trace is important to diagnose where/why it failed. Consider logging
the exception object (e.g., pass `ex` to the logger) and avoid duplicating
`ex.getMessage()` in the format string.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]