diff --git a/cmd/server/health.go b/cmd/server/health.go index 73ce374792..eb780b9a92 100644 --- a/cmd/server/health.go +++ b/cmd/server/health.go @@ -56,8 +56,8 @@ func pinger(c *cli.Context) error { return err } defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("server returned non-200 status code") + if resp.StatusCode < 200 && resp.StatusCode >= 300 { + return fmt.Errorf("server returned bad status code") } return nil }