From 92efff0a4f95c6f2a9b9d85f7710479b4b35f00a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 3 Jan 2022 18:44:39 +0100 Subject: [PATCH] rekor-cli: show the url in case of error Otherwise, the error: ` error retrieving external entities: error received while fetching artifact: 404 Not Found ` Which isn't great for debugging Signed-off-by: Sylvestre Ledru --- pkg/util/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/fetch.go b/pkg/util/fetch.go index e9c95bb19..f65f94aae 100644 --- a/pkg/util/fetch.go +++ b/pkg/util/fetch.go @@ -39,7 +39,7 @@ func FileOrURLReadCloser(ctx context.Context, url string, content []byte) (io.Re return nil, err } if resp.StatusCode < 200 || resp.StatusCode > 299 { - return nil, fmt.Errorf("error received while fetching artifact: %v", resp.Status) + return nil, fmt.Errorf("error received while fetching artifact '%v': %v", url, resp.Status) } dataReader = resp.Body