From 79abe5d8bfd3c6180ec183d82077f7177e6cd494 Mon Sep 17 00:00:00 2001 From: "Plummer, Brittany" Date: Fri, 22 Nov 2019 08:20:45 -0500 Subject: improve error log scores Updated error code name to fix spelling Defaulted errorcode and errordesc to unknown when not provided Remove unused imports from nc orchestrator application Added defaulting of serviceName to error log Issue-ID: SO-2538 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I5ae960f728739e2528173b66484562742429416c --- .../org/onap/so/apihandler/common/ResponseHandler.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-common') diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java index 095182fe98..bedce185c5 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java @@ -98,8 +98,9 @@ public class ResponseHandler { if (response != null) { responseBody = response.getResponse(); } else { - ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, - ErrorCode.BusinessProcesssError).targetEntity("Camunda").targetServiceName("parseCamunda").build(); + ErrorLoggerInfo errorLoggerInfo = + new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError) + .targetEntity("Camunda").targetServiceName("parseCamunda").build(); BPMNFailureException bpmnFailureException = new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL) .errorInfo(errorLoggerInfo).build(); @@ -123,8 +124,9 @@ public class ResponseHandler { ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build(); } if (status != HttpStatus.SC_ACCEPTED) { - ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, - ErrorCode.BusinessProcesssError).targetEntity("BPEL").targetServiceName("parseBpel").build(); + ErrorLoggerInfo errorLoggerInfo = + new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError) + .targetEntity("BPEL").targetServiceName("parseBpel").build(); throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL) .errorInfo(errorLoggerInfo).build(); @@ -149,9 +151,9 @@ public class ResponseHandler { .build(); } if (status != HttpStatus.SC_NO_CONTENT && status != HttpStatus.SC_ACCEPTED) { - ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, - ErrorCode.BusinessProcesssError).targetEntity("CAMUNDATASK").targetServiceName("parseCamundaTask") - .build(); + ErrorLoggerInfo errorLoggerInfo = + new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, ErrorCode.BusinessProcessError) + .targetEntity("CAMUNDATASK").targetServiceName("parseCamundaTask").build(); throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL) .errorInfo(errorLoggerInfo).build(); -- cgit 1.2.3-korg