diff options
Diffstat (limited to 'asdc-controller/src/main/java/org')
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java index a084ce7177..317296fbed 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java @@ -68,7 +68,9 @@ public class ActivitySpecsActions { Response response = httpClient.post(payload); int statusCode = response.getStatus(); - if (statusCode != HttpStatus.SC_OK) { + if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) { + logger.warn(Strings.repeat("{} ", 3), "ActivitySpec", activitySpec.getName(), "already exists in SDC"); + } else if (statusCode != HttpStatus.SC_OK && statusCode != HttpStatus.SC_CREATED) { logger.warn(Strings.repeat("{} ", 3), "Error creating activity spec", activitySpec.getName(), statusCode); } else { @@ -110,7 +112,10 @@ public class ActivitySpecsActions { int statusCode = response.getStatus(); - if (statusCode != HttpStatus.SC_OK) { + if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) { + logger.warn(Strings.repeat("{} ", 3), "ActivitySpec with id", activitySpecId, + "is already certified in SDC"); + } else if (statusCode != HttpStatus.SC_OK) { logger.warn(Strings.repeat("{} ", 3), "Error certifying activity", activitySpecId, statusCode); } else { certificationResult = true; |