Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etcdserver, client: propagate and print detailed error message
Current etcdserver just returns an error message "Internal Server Error" in a case of internal error. This message isn't friendly and not so useful for diagnosis. In addition, etcdctl just reports "client: etcd cluster is unavailable or misconfigured" in such a case. This commit improves the error message. The new body of error response is now generated based on an error code of etcdserver. The client constructs more friendly error message based on the response. Below is an example: Before: $ etcdctl member add infra6 http://127.0.0.1:32338 client: etcd cluster is unavailable or misconfigured After: $ etcdctl member add infra6 http://127.0.0.1:32338 error #0: client: etcd member http://127.0.0.1:12379: etcdserver: re-configuration failed due to not enough started members error etcd-io#1: client: etcd member http://127.0.0.1:22379: etcdserver: re-configuration failed due to not enough started members error etcd-io#2: client: etcd member http://127.0.0.1:32379: etcdserver: re-configuration failed due to not enough started members
- Loading branch information