pub.grpc.observer:onError
WmGRPC. Notifies the gRPC client about an unsuccessful gRPC request caused by an error that occurred during the gRPC request processing performed by the gRPC method flow service.
Input Parameters
Output Parameters
None.
Usage Notes
An instance of the streamObserver is present in the pipeline when any gRPC method flow service is invoked by the gRPC server. It is an opaque object to be used only as input to the pub.grpc.observer:onNext, pub.grpc.observer:onCompleted, or pub.grpc.observer:onError services.
For unary methods, the gRPC method flow service automatically generated for a gRPC descriptor contains the calls to the pub.grpc.observer:onNext and pub.grpc.observer:onCompleted services. When implementing the logic for the RPC method in the RPC method flow service, you can modify the gRPC method flow service to include logic to return a gRPC error by adding an INVOKE step for the pub.grpc.observer:onError service. If you modify the gRPC method flow service to return an error or return a response message, make sure the flow logic ensures that either pub.grpc.observer:onError executes or pub.grpc.observer:onNext and pub.grpc.observer:onCompleted execute. This can be accomplished by using a BRANCH step. Further, the flow service logic must terminate immediately after executing pub.grpc.observer:onError.