From: Oleg Mitsura Date: Tue, 23 Jul 2019 15:10:18 +0000 (-0400) Subject: ExecutionServiceHandler error handler error fix. X-Git-Tag: 0.5.0~33^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F91873%2F1;p=ccsdk%2Fcds.git ExecutionServiceHandler error handler error fix. Status was not getting set to failure due to another failure in getting localized message not being set. That caused a silent failure, which cascaded into not being able to set the result of the resolution as the status was null, and JPA didn't allow the insertion due to table RESOURCE_RESOLUTION constraint. Signed-off-by: Oleg Mitsura Change-Id: Iff0528ffab4ae77d0077be2edff6eb421adc68e0 --- diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt index 5a4f3dea4..347e5eac4 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt @@ -118,7 +118,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP return output } catch (e: Exception) { log.error("fail processing request id $requestId", e) - return response(executionServiceInput, e.localizedMessage, true) + return response(executionServiceInput, e.localizedMessage ?: e.message ?: e.toString(), true) } } @@ -156,4 +156,4 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP return executionServiceOutput } -} \ No newline at end of file +}