summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-02-26 16:28:59 +0000
committerAnderson Ribeiro <anderson.ribeiro@est.tech>2021-03-01 11:45:14 +0000
commit97d15f764138e0d49963f168d339fc1637cc5376 (patch)
tree979ebcb8d27736cdcc24b96f11360f97c5009fa9 /catalog-be/src/main
parent8677823abd3fc36120fb50a45cb71b9c4e0fdbf5 (diff)
Increase unit test coverage
Increase ComponentInstance unit test coverage Issue-ID: SDC-3493 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Ife5a9b9cc41e5210005c37d368a094c86fa26db8
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
index 8e54cc9d51..49d89c177e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
@@ -180,7 +180,8 @@ public class ComponentInstanceServlet extends AbstractValidationsServlet {
} catch (final Exception e) {
BeEcompErrorManager.getInstance().logBeRestApiGeneralError("Create Component Instance");
log.debug("create component instance failed with exception", e);
- throw new ByActionStatusComponentException(ActionStatus.INVALID_CONTENT);
+ return buildErrorResponse(
+ getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT, containerComponentType));
}
loggerSupportability.log(LoggerSupportabilityActions.CREATE_INSTANCE, StatusCode.STARTED,