Issue 494: Fix error reporting in http state reader

main
Louis TOUSSAINT 2021-06-02 17:39:01 +02:00
parent ea8e1c5aa5
commit 87426cb5b6
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ func (h *HTTPBackend) Read(p []byte) (n int, err error) {
return 0, errors.Errorf("error requesting HTTP(s) backend state: status code: %d", res.StatusCode)
}
}
return h.reader.Read(p)
read, err := h.reader.Read(p)
if err != nil {
return 0, err
}
return read, nil
}
func (h *HTTPBackend) Close() error {