From 2ee4525cd2a521ed38ab0453b531564e943c1bea Mon Sep 17 00:00:00 2001 From: Louis-Paul Dareau Date: Thu, 23 Aug 2018 13:37:39 +0200 Subject: [PATCH 1/2] clientv3/doc: Update error handling godoc 0c5bcd5d8094ef64e8377753d48c038327a266d6 updated error handling for `ErrEmptyKey` but missed the godoc. --- clientv3/doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clientv3/doc.go b/clientv3/doc.go index cd6ef01d2..1bdcd9c17 100644 --- a/clientv3/doc.go +++ b/clientv3/doc.go @@ -71,14 +71,14 @@ // // ctx is canceled by another routine // } else if err == context.DeadlineExceeded { // // ctx is attached with a deadline and it exceeded +// } else if err == rpctypes.ErrEmptyKey { +// // client-side error: key argument is empty // } else if ev, ok := status.FromError(err); ok { // code := ev.Code() // if code == codes.DeadlineExceeded { // // server-side context might have timed-out first (due to clock skew) // // while original client-side context is not timed-out yet // } -// } else if verr, ok := err.(*v3rpc.ErrEmptyKey); ok { -// // process (verr.Errors) // } else { // // bad cluster endpoints, which are not etcd servers // } From a3c09ee8e94161e8199b22ac91addaaf70d466f4 Mon Sep 17 00:00:00 2001 From: Louis-Paul Dareau Date: Thu, 23 Aug 2018 19:47:27 +0200 Subject: [PATCH 2/2] clientv3/doc: Improve error handling comment --- clientv3/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientv3/doc.go b/clientv3/doc.go index 1bdcd9c17..5beaaddd6 100644 --- a/clientv3/doc.go +++ b/clientv3/doc.go @@ -72,7 +72,7 @@ // } else if err == context.DeadlineExceeded { // // ctx is attached with a deadline and it exceeded // } else if err == rpctypes.ErrEmptyKey { -// // client-side error: key argument is empty +// // client-side error: key is not provided // } else if ev, ok := status.FromError(err); ok { // code := ev.Code() // if code == codes.DeadlineExceeded {