summaryrefslogtreecommitdiffstats
path: root/aai-els-onap-logging/src
diff options
context:
space:
mode:
Diffstat (limited to 'aai-els-onap-logging/src')
-rw-r--r--aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java3
-rw-r--r--aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java b/aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java
index 97548d99..bb2fe268 100644
--- a/aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java
+++ b/aai-els-onap-logging/src/main/java/org/onap/aai/logging/ErrorLogHelper.java
@@ -383,8 +383,7 @@ public class ErrorLogHelper {
}
private static ErrorObject getRestErrorObject(AAIException aaiException) {
- final int restErrorCode = Integer.parseInt(aaiException.getErrorObject().getRESTErrorCode());
- return ErrorLogHelper.getErrorObject("AAI_" + restErrorCode);
+ return ErrorLogHelper.getErrorObject("AAI_" + aaiException.getErrorObject().getRESTErrorCode());
}
public static Fault createPolicyFault(AAIException aaiException, String text, List<String> variables) {
diff --git a/aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java b/aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java
index ea9d44b9..73890a0a 100644
--- a/aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java
+++ b/aai-els-onap-logging/src/test/java/org/onap/aai/logging/ErrorLogHelperTest.java
@@ -265,7 +265,7 @@ public class ErrorLogHelperTest {
Info info = ErrorLogHelper.getRestApiInfoResponse(aaiExceptionsMap);
ErrorMessage errorMessage = info.getErrorMessages().get(0);
assertEquals("INF0001", errorMessage.getMessageId());
- assertEquals("Internal Error (msg=%1) (ec=%2)", errorMessage.getText());
+ assertEquals("Success X-FromAppId=%1 X-TransactionId=%2 (msg=%3) (ec=%4)", errorMessage.getText());
assertEquals("Successful health check:OK", errorMessage.getVariables().get(0));
assertEquals("0.0.0002", errorMessage.getVariables().get(1));
}