Bugfix: Blueprints Processor always return 200 OK 75/87575/4
authorottero <rodrigo.ottero@est.tech>
Thu, 16 May 2019 09:00:07 +0000 (09:00 +0000)
committerottero <rodrigo.ottero@est.tech>
Thu, 16 May 2019 09:00:07 +0000 (09:00 +0000)
commit5801ed7abaa58f7ef728ad68c496a3780d438194
tree21e94f4d3c548fdfd24b2c7c9bf08d5807caa041
parent250b5b2a4ad4020df9c0dd053743d28616e28485
Bugfix: Blueprints Processor always return 200 OK

Currently the Blueprints Processor mS replies with a 200 OK HTTP status
code even if an exception occurs in the server side while executing the
request.

Thus, the only way for a REST client to determine if the request was
successful or not is by analysing the response and evaluate the
content of the element status.code

This bugfix modifies the HTTP status code of the response to match the
one inside the response.

Issue-ID: CCSDK-1327
Change-Id: I05a58cb3ab9359319172f2d8f1a665fdcdc1230b
Signed-off-by: ottero <rodrigo.ottero@est.tech>
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/execution-input/faulty-input.json [new file with mode: 0644]