diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/SecretsUtil.java b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/SecretsUtil.java index 6da8e8318f87..06908e410d8f 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/secrets/SecretsUtil.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/secrets/SecretsUtil.java @@ -78,17 +78,18 @@ public static Object convert( return ClassConverterFactory.getConverter(clazz).convert(connectionConfig); } catch (Exception e) { // If we have the name we are trying to encrypt a connection + String message = e.getMessage(); if (connectionName != null) { throw new InvalidServiceConnectionException( String.format( - "Failed to convert [%s] to type [%s]. Review the connection.", - connectionName, connectionType)); + "Failed to convert [%s] to type [%s]. Review the connection.\n%s", + connectionName, connectionType, message)); } // If we don't have the name, we are decrypting from the db throw new InvalidServiceConnectionException( String.format( - "Failed to load the connection of type [%s]. Did migrations run properly?", - connectionType)); + "Failed to load the connection of type [%s]. Did migrations run properly?\n%s", + connectionType, message)); } } }