diff --git a/cmd/client/main.go b/cmd/client/main.go index ffc8600..7af8cf4 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -200,6 +200,11 @@ func (c *Coordinator) doPoll(client *http.Client) error { } defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + level.Warn(c.logger).Log("msg", "Unexpected response", "statusCode", resp.StatusCode) + return fmt.Errorf("unexpected response status=%d", resp.StatusCode) + } + request, err := http.ReadRequest(bufio.NewReader(resp.Body)) if err != nil { level.Error(c.logger).Log("msg", "Error reading request:", "err", err)