- if (policy != null) {
-
- if ((policy.getId().contains("Config_MS_")) || (policy.getId().contains("BRMS_Param"))) {
- if (preSafetyCheck(policy)) {
- PolicyLogger.debug("Precheck Successful.");
- }
- }
- PolicyLogger.info("Preparing to remove policy from group: " + group.getId());
- removePolicy.prepareToRemove(policy);
- OnapPDPGroup updatedGroup = removePolicy.getUpdatedObject();
- responseString = deletePolicyFromPDPGroup(updatedGroup, loggingContext);
- } else {
- String message = XACMLErrorConstants.ERROR_DATA_ISSUE + "Policy does not exist on the PDP.";
- PolicyLogger.error(message);
- PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE + " Policy does not exist on the PDP.");
+ if (policy == null) {
+ String message =
+ XACMLErrorConstants.ERROR_DATA_ISSUE + "Policy does not exist on the PDP - " + policyName;
+ LOGGER.error(message + " - RequestId - " + requestId);