Document that all errors from RPCs are status errors (#1782)

This commit is contained in:
Menghan Li
2018-01-05 15:37:05 -08:00
committed by GitHub
parent 8a8ac82f1f
commit 6913ad5cae
2 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,8 @@ func sendRequest(ctx context.Context, dopts dialOptions, compressor Compressor,
// Invoke sends the RPC request on the wire and returns after response is
// received. This is typically called by generated code.
//
// All errors returned by Invoke are compatible with the status package.
func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...CallOption) error {
if cc.dopts.unaryInt != nil {
return cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...)