ExecutionServiceHandler error handler error fix. 73/91873/1
authorOleg Mitsura <oleg.mitsura@amdocs.com>
Tue, 23 Jul 2019 15:10:18 +0000 (11:10 -0400)
committerOleg Mitsura <oleg.mitsura@amdocs.com>
Tue, 23 Jul 2019 15:15:16 +0000 (11:15 -0400)
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 <oleg.mitsura@amdocs.com>
Change-Id: Iff0528ffab4ae77d0077be2edff6eb421adc68e0

ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt

index 5a4f3de..347e5ea 100644 (file)
@@ -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
+}