Skip to content

Commit

Permalink
Merge pull request #867 from spencerhance/update-backend-health-error
Browse files Browse the repository at this point in the history
Separate out health check errors for Backends
  • Loading branch information
k8s-ci-robot committed Sep 27, 2019
2 parents 2fb49e2 + 6d4eb54 commit 5bef228
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@ func (b *Backends) Delete(name string, version meta.Version, scope meta.KeyType)
// Health implements Pool.
func (b *Backends) Health(name string, version meta.Version, scope meta.KeyType) (string, error) {
be, err := b.Get(name, version, scope)
if err != nil || len(be.Backends) == 0 {
return "Unknown", fmt.Errorf("error getting backend %q: %v", name, err)
if err != nil {
return "Unknown", fmt.Errorf("error getting backend service %s: %v", name, err)
}
if len(be.Backends) == 0 {
return "Unknown", fmt.Errorf("no backends found for backend service %q", name)
}

// TODO: Look at more than one backend's status
Expand Down

0 comments on commit 5bef228

Please sign in to comment.