From: SP00501638 Date: Thu, 15 Mar 2018 12:18:43 +0000 (+0530) Subject: Sonar Critical X-Git-Tag: v1.2.1~420^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F35985%2F1;p=so.git Sonar Critical Either log or rethrow this exception ServiceInstances.java:512,522,727 Sonar Link: https://sonar.onap.org/project/issues?assignees=swapnalipode&id=org.onap.so%3Aso&open=AWIklWkKRGy6eclHDh4e&resolved=false Location: /mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java Change-Id: I4697022be8de7a746d2b7d868badc919545a353b Issue-ID: SO-486 Signed-off-by: SP00501638 --- diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java index efc58ed691..dba562e927 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java @@ -510,6 +510,7 @@ public class ServiceInstances { try { sir = convertJsonToServiceInstanceRequest(requestJSON, action, startTime, sir, msoRequest); } catch(Exception e) { + msoLogger.debug("Exception occurred while mapping of request to JSON object ", e); Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, "Mapping of request to JSON object failed. " + e.getMessage(), ErrorNumbers.SVC_BAD_PARAMETER, null); @@ -520,6 +521,7 @@ public class ServiceInstances { try { parseRequest(requestJSON, action, instanceIdMap, version, startTime, sir, msoRequest); } catch(Exception e) { + msoLogger.debug("Exception occurred while logging ", e); Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, "Error parsing request. " + e.getMessage(), ErrorNumbers.SVC_BAD_PARAMETER, null); @@ -725,6 +727,7 @@ public class ServiceInstances { try { createRequestRecord(action, startTime, msoRequest); } catch(Exception e) { + msoLogger.debug("Exception occurred while creating record in DB", e); Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, MsoException.ServiceException, "Exception while creating record in DB " + e.getMessage(),