diff options
author | Chan, Mercy <merce.chan@att.com> | 2019-08-29 16:12:22 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-08-29 16:12:22 -0400 |
commit | f0dc8623294868179f1264a6ef80980dd990a313 (patch) | |
tree | 5d7639239a4690b3236c3ef1040a251186ac469c /mso-api-handlers/mso-api-handler-infra/src/main | |
parent | eb3835986cec920c7add691fc9233e4be7c238cc (diff) |
added fix for missing Error from SDNC prefix
added fix for missing Error from SDNC prefix to SDNC callback flow
reverted implementation from bpmn-tasks package and moved them to apih
side, added junit test
renamed error message constant, removed regex check, add error message
porefix directly to actual message
Issue-ID: SO-2267
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I440cf9eff12571f576fcc5f2d28d9f2c8130e4b6
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java index a5ccb1b29b..8896e93175 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java @@ -83,6 +83,7 @@ import io.swagger.annotations.ApiOperation; public class OrchestrationRequests { private static Logger logger = LoggerFactory.getLogger(OrchestrationRequests.class); + private static final String ERROR_MESSAGE_PREFIX = "Error Source: %s, Error Message: %s"; @Autowired private RequestsDbClient requestsDbClient; @@ -449,7 +450,12 @@ public class OrchestrationRequests { String statusMessages = null; if (iar.getStatusMessage() != null) { - statusMessages = "STATUS: " + iar.getStatusMessage(); + if (StringUtils.isNotBlank(iar.getExtSystemErrorSource())) { + statusMessages = "STATUS: " + + String.format(ERROR_MESSAGE_PREFIX, iar.getExtSystemErrorSource(), iar.getStatusMessage()); + } else { + statusMessages = "STATUS: " + iar.getStatusMessage(); + } } if (OrchestrationRequestFormat.STATUSDETAIL.toString().equalsIgnoreCase(format)) { |