diff --git a/storage/remote/client.go b/storage/remote/client.go index f00b3e7331..af696336bd 100644 --- a/storage/remote/client.go +++ b/storage/remote/client.go @@ -384,7 +384,8 @@ func (c *Client) Read(ctx context.Context, query *prompb.Query, sortSeries bool) _ = httpResp.Body.Close() cancel() - return nil, fmt.Errorf("remote server %s returned http status %s: %s", c.urlString, httpResp.Status, string(body)) + err := errors.New(string(body)) + return nil, fmt.Errorf("remote server %s returned http status %s: %w", c.urlString, httpResp.Status, err) } contentType := httpResp.Header.Get("Content-Type")