diff options
author | Plummer, Brittany <brittany.plummer@att.com> | 2019-11-22 08:20:45 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-11-22 08:20:46 -0500 |
commit | 79abe5d8bfd3c6180ec183d82077f7177e6cd494 (patch) | |
tree | 8304f6336411fd003ceb76deb60fb9d3ae6de433 /adapters/mso-sdnc-adapter/src/main/java/org/onap | |
parent | df2db9f4a7c3fccc5f617792a057d8dbc6bf9d34 (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 'adapters/mso-sdnc-adapter/src/main/java/org/onap')
4 files changed, 9 insertions, 9 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java index 012a19f1a9..a8418ea901 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java @@ -178,7 +178,7 @@ public class SDNCRestClient { return (sdncResp); } catch (Exception e) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC", - ErrorCode.BusinessProcesssError.getValue(), "Exception processing request to SDNC", e); + ErrorCode.BusinessProcessError.getValue(), "Exception processing request to SDNC", e); // default sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR); String respMsg = "Error processing request to SDNC. "; @@ -246,7 +246,7 @@ public class SDNCRestClient { } // is != null } catch (Exception e1) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_GET_RESPONSE_SDNC.toString(), "SDNC", - ErrorCode.BusinessProcesssError.getValue(), "Exception while get SDNC response", e1); + ErrorCode.BusinessProcessError.getValue(), "Exception while get SDNC response", e1); } } // con != null @@ -312,7 +312,7 @@ public class SDNCRestClient { headers.put("Authorization", Collections.singletonList(basicAuth)); } catch (Exception e2) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA, - ErrorCode.BusinessProcesssError.getValue(), + ErrorCode.BusinessProcessError.getValue(), "Exception - Unable to set authorization in callback request", e2); } @@ -322,7 +322,7 @@ public class SDNCRestClient { } catch (Exception e) { error = "Error sending BpelCallback request" + e.getMessage(); - logger.error("Error {} - {} - {}", ErrorCode.BusinessProcesssError.getValue(), + logger.error("Error {} - {} - {}", ErrorCode.BusinessProcessError.getValue(), MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), error, e); } logger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA); diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java index 1c47a2d6b0..f710988886 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java @@ -99,7 +99,7 @@ public class Utils { } catch (Exception e) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC", - ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e); + ErrorCode.BusinessProcessError.getValue(), "Exception in genSdncReq", e); } return null; } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java index b50662a832..8a1a7559b5 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java @@ -125,7 +125,7 @@ public class BPRestCallback { method.setHeader(ONAPLogConstants.Headers.PARTNER_NAME, "SO-SDNCAdapter"); } catch (Exception e) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA, - ErrorCode.BusinessProcesssError.getValue(), "Unable to set authorization in callback request", + ErrorCode.BusinessProcessError.getValue(), "Unable to set authorization in callback request", e); error = true; } @@ -143,14 +143,14 @@ public class BPRestCallback { if (httpResponse.getStatusLine().getStatusCode() >= 300) { String msg = "Received error response to callback request: " + httpResponse.getStatusLine(); logger.error(LoggingAnchor.FOUR, MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA, - ErrorCode.BusinessProcesssError.getValue(), msg); + ErrorCode.BusinessProcessError.getValue(), msg); } } return true; } catch (Exception e) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA, - ErrorCode.BusinessProcesssError.getValue(), "Error sending callback request", e); + ErrorCode.BusinessProcessError.getValue(), "Error sending callback request", e); return false; } finally { if (httpResponse != null) { diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java index 5697ed56a5..50c8a089df 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java @@ -185,7 +185,7 @@ public class SDNCServiceRequestTask { addTextChild(agnosticServiceInformation, "anydata", anydata); } catch (Exception e) { logger.error(LoggingAnchor.FOUR, MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC", - ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e); + ErrorCode.BusinessProcessError.getValue(), "Exception in genSdncReq", e); return null; } |