Skip to content

Commit

Permalink
add ErrKeyNotFound exception in NewConsulDiscoveryStore
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyang3232 committed Sep 9, 2020
1 parent 46d874e commit 19fb932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/consul_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewConsulDiscoveryStore(basePath string, kv store.Store) ServiceDiscovery {
d.stopCh = make(chan struct{})

ps, err := kv.List(basePath)
if err != nil {
if err != nil && err.Error() != store.ErrKeyNotFound.Error() {
log.Infof("cannot get services of from registry: %v, err: %v", basePath, err)
panic(err)
}
Expand Down

0 comments on commit 19fb932

Please sign in to comment.