}
private void run() throws PolicyException {
- // Check Validation.
- /*
- * if(!getValidation()){ LOGGER.error(message); throw new
- * PolicyException(message); }
- */
// Get Result.
try {
status = HttpStatus.OK;
metricsResponse.setPdpMetrics(pdpCount);
} catch (JsonException | IllegalStateException e) {
+ String jsonString = null;
+ if(json != null){
+ jsonString = json.toString();
+ }
message = XACMLErrorConstants.ERROR_DATA_ISSUE
- + " improper JSON object : " + json.toString();
- LOGGER.error(message);
+ + " improper JSON object : " + jsonString;
+ LOGGER.error(message + e);
metricsResponse.setResponseMessage(message);
metricsResponse.setResponseCode(400);
return metricsResponse;