Source:
<code>public void onEntityConfigChange(ClusterProfile updatedClusterProfile) { LOGGER.debug("Resolving the updated cluster profile for secrets", updatedClusterProfile); <START> secretParamResolver.resolve(updatedClusterProfile); <END> Map<String, String> updatedClusterConfigMap = updatedClusterProfile.getConfigurationAsMap(true, true); if (goConfigService.getElasticConfig().getClusterProfiles().find(updatedClusterProfile.getId()) == null) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.DELETED, updatedClusterConfigMap, null); updateClusterProfilesCopy(); return; } ClusterProfile oldClusterProfile = existingClusterProfiles.find(updatedClusterProfile.getId()); if (oldClusterProfile == null) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.CREATED, null, updatedClusterConfigMap); updateClusterProfilesCopy(); return; } LOGGER.debug("Resolving the older cluster profile for secrets", oldClusterProfile); secretParamResolver.resolve(oldClusterProfile); Map<String, String> olderClusterConfigMap = oldClusterProfile.getConfigurationAsMap(true, true); if (oldClusterProfile.getPluginId().equals(updatedClusterProfile.getPluginId())) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.UPDATED, olderClusterConfigMap, updatedClusterConfigMap); updateClusterProfilesCopy(); } else { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.CREATED, null, updatedClusterConfigMap); registry.notifyPluginAboutClusterProfileChanged(oldClusterProfile.getPluginId(), ClusterProfilesChangedStatus.DELETED, olderClusterConfigMap, null); updateClusterProfilesCopy(); } }</code><technical_language>discussed need add a server health message if secret resolution fails log well</technical_language>

Target:
public void onEntityConfigChange(ClusterProfile updatedClusterProfile) { try { LOGGER.debug("Resolving secrets for updated cluster profile: {}", updatedClusterProfile); secretParamResolver.resolve(updatedClusterProfile); } catch (RulesViolationException | SecretResolutionFailureException e) { logAndRaiseServerHealthMessage(updatedClusterProfile, e.getMessage()); return; } Map<String, String> updatedClusterConfigMap = updatedClusterProfile.getConfigurationAsMap(true, true); if (goConfigService.getElasticConfig().getClusterProfiles().find(updatedClusterProfile.getId()) == null) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.DELETED, updatedClusterConfigMap, null); updateClusterProfilesCopy(); return; } ClusterProfile oldClusterProfile = existingClusterProfiles.find(updatedClusterProfile.getId()); if (oldClusterProfile == null) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.CREATED, null, updatedClusterConfigMap); updateClusterProfilesCopy(); return; } try { LOGGER.debug("Resolving secrets for older cluster profile: {}", oldClusterProfile); secretParamResolver.resolve(oldClusterProfile); } catch (RulesViolationException | SecretResolutionFailureException e) { logAndRaiseServerHealthMessage(oldClusterProfile, e.getMessage()); return; } Map<String, String> olderClusterConfigMap = oldClusterProfile.getConfigurationAsMap(true, true); if (oldClusterProfile.getPluginId().equals(updatedClusterProfile.getPluginId())) { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.UPDATED, olderClusterConfigMap, updatedClusterConfigMap); updateClusterProfilesCopy(); } else { registry.notifyPluginAboutClusterProfileChanged(updatedClusterProfile.getPluginId(), ClusterProfilesChangedStatus.CREATED, null, updatedClusterConfigMap); registry.notifyPluginAboutClusterProfileChanged(oldClusterProfile.getPluginId(), ClusterProfilesChangedStatus.DELETED, olderClusterConfigMap, null); updateClusterProfilesCopy(); } }