ray.serve.grpc_util.RayServegRPCContext.set_code#

RayServegRPCContext.set_code(code: grpc.StatusCode)[source]#

Sets the value to be used as status code upon RPC completion.

This method need not be called by method implementations if they wish the gRPC runtime to determine the status code of the RPC.

Parameters:

code – A StatusCode object to be sent to the client.