aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java')
-rw-r--r--ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java
index d390df864..dc431b0d5 100644
--- a/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java
+++ b/ECOMP-PDP-REST/src/main/java/org/openecomp/policy/pdp/rest/api/services/GetMetricsService.java
@@ -118,9 +118,13 @@ public class GetMetricsService {
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 != null ? json.toString() : "JSON is null";
- LOGGER.error(message);
+ + " improper JSON object : " + jsonString;
+ LOGGER.error(message + e);
metricsResponse.setResponseMessage(message);
metricsResponse.setResponseCode(400);
return metricsResponse;