From 087d48a8bd74f39eabea96b495d132e3332b5927 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 12 Dec 2018 14:31:52 -0800 Subject: [PATCH] Update the documentation about the status code constraint --- src/python/grpcio/grpc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 441f4ac8132..daf869b1563 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -276,7 +276,6 @@ class Status(six.with_metaclass(abc.ABCMeta)): Attributes: code: A StatusCode object to be sent to the client. - It must not be StatusCode.OK. details: An ASCII-encodable string to be sent to the client upon termination of the RPC. trailing_metadata: The trailing :term:`metadata` in the RPC. @@ -1145,7 +1144,8 @@ class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)): This is an EXPERIMENTAL API. Args: - status: A grpc.Status object. + status: A grpc.Status object. The status code in it must not be + StatusCode.OK. Raises: Exception: An exception is always raised to signal the abortion the