From 5c334293cd4e448331f2bae68a13f3bd80b95ed6 Mon Sep 17 00:00:00 2001 From: Vicki Cheung Date: Mon, 7 Dec 2015 02:29:20 -0500 Subject: [PATCH] fixing etcd missing key error --- physical/etcd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physical/etcd.go b/physical/etcd.go index fc110af62..9c61aaecb 100644 --- a/physical/etcd.go +++ b/physical/etcd.go @@ -53,8 +53,8 @@ var ( // errorIsMissingKey returns true if the given error is an etcd error with an // error code corresponding to a missing key. func errorIsMissingKey(err error) bool { - etcdErr, ok := err.(*client.Error) - return ok && etcdErr.Code == 100 + etcdErr, ok := err.(client.Error) + return ok && etcdErr.Code == client.ErrorCodeKeyNotFound } // EtcdBackend is a physical backend that stores data at specific