aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src
diff options
context:
space:
mode:
authorprathamesh morde <prathamesh.morde@bell.ca>2019-04-03 17:54:45 -0400
committerprathamesh morde <prathamesh.morde@bell.ca>2019-04-03 18:12:30 -0400
commit835c347f632c32d67ad5051b8dd93b059e1eadaf (patch)
tree19eecf7a9cb6e2433877eb1ca5240fbd1d93757e /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src
parenta2a21cd7a80c3ff3b754d7a4e47fc48f45ff2312 (diff)
BluePrintManagmentGRPC handler should send failure message back to the client.
-Added StreamObserver.onError so the client would be aware of failure if any. Change-Id: Iecd019ef4ff4b4b4c522e0eb6e242770afdcdfcd Issue-ID: CCSDK-1197 Signed-off-by: prathamesh morde <prathamesh.morde@bell.ca>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt
index 251ae2c3a..549d6cd9f 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt
@@ -62,7 +62,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
responseObserver.onNext(successStatus("Successfully uploaded CBA($blueprintId)...", request.commonHeader))
responseObserver.onCompleted()
} catch (e: Exception) {
- failStatus("request(${request.commonHeader.requestId}): Failed to upload CBA", e)
+ responseObserver.onError(failStatus("request(${request.commonHeader.requestId}): Failed to upload CBA", e))
} finally {
deleteDir(bluePrintPathConfiguration.blueprintArchivePath, uploadId)
deleteDir(bluePrintPathConfiguration.blueprintWorkingPath, uploadId)
@@ -87,7 +87,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
responseObserver.onNext(successStatus("Successfully deleted $blueprint", request.commonHeader))
responseObserver.onCompleted()
} catch (e: Exception) {
- failStatus("request(${request.commonHeader.requestId}): Failed to delete $blueprint", e)
+ responseObserver.onError(failStatus("request(${request.commonHeader.requestId}): Failed to delete $blueprint", e))
}
}
}