aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-11-22 08:20:45 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-11-22 08:20:46 -0500
commit79abe5d8bfd3c6180ec183d82077f7177e6cd494 (patch)
tree8304f6336411fd003ceb76deb60fb9d3ae6de433 /mso-api-handlers/mso-api-handler-common
parentdf2db9f4a7c3fccc5f617792a057d8dbc6bf9d34 (diff)
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) <mb388a@att.com> Change-Id: I5ae960f728739e2528173b66484562742429416c
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java16
1 files changed, 9 insertions, 7 deletions
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();