From 4ea690a178a875b9f9d8f61168ec4b43681e09a1 Mon Sep 17 00:00:00 2001 From: Oleg Mitsura Date: Tue, 23 Jul 2019 11:10:18 -0400 Subject: 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 --- .../blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +} -- cgit 1.2.3-korg