diff --git a/pkg/iac/terraform/state/backend/http_reader.go b/pkg/iac/terraform/state/backend/http_reader.go index ccd5e28c..7d97d0e3 100644 --- a/pkg/iac/terraform/state/backend/http_reader.go +++ b/pkg/iac/terraform/state/backend/http_reader.go @@ -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 {