summaryrefslogtreecommitdiffstats
path: root/appc-provider
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-04-20 21:10:43 +0000
committerGerrit Code Review <gerrit@onap.org>2017-04-20 21:10:43 +0000
commitb06810bb67667edb0d9d9087cc1f978bda988c87 (patch)
tree3d5bdba464b3156a4ba24c03aa83897816985171 /appc-provider
parentf061217a2cfe6030cf147c852a4d6d183e7fb2e0 (diff)
parentc9373d8f5809fe650c30832e9409282cb34688f8 (diff)
Merge "Refactor Status to be immutable"
Diffstat (limited to 'appc-provider')
-rw-r--r--appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderLcm.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderLcm.java b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderLcm.java
index 5fe174e55..6d186ab5f 100644
--- a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderLcm.java
+++ b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderLcm.java
@@ -462,14 +462,10 @@ public class AppcProviderLcm implements AutoCloseable, AppcProviderLcmService {
requestHandlerOutput = new RequestHandlerOutput();
requestHandlerOutput.setResponseContext(responseContext);
responseContext.setCommonHeader(request.getRequestContext().getCommonHeader());
- final org.openecomp.appc.domainmodel.lcm.Status status = new org.openecomp.appc.domainmodel.lcm.Status();
-
- responseContext.setStatus(status);
-
String errorMessage = e.getMessage() != null ? e.getMessage() : e.toString();
Params params = new Params().addParam("errorMsg", errorMessage);
- status.setCode(LCMCommandStatus.UNEXPECTED_ERROR.getResponseCode());
- status.setMessage(LCMCommandStatus.UNEXPECTED_ERROR.getFormattedMessage(params));
+ responseContext.setStatus(LCMCommandStatus.UNEXPECTED_ERROR.toStatus(params));
+
LoggingUtils.logErrorMessage(
LoggingConstants.TargetNames.APPC_PROVIDER,
reason,