Skip to content

Commit d2a4a49

Browse files
committed
update logging
1 parent e0706e8 commit d2a4a49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/oci/registry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ func (rc *RegistryClient) CheckImage(ctx context.Context, named reference.Named)
101101
}
102102

103103
if res.StatusCode != http.StatusOK {
104-
return res, fmt.Errorf("image does not exist: %s", res.Status)
104+
return res, fmt.Errorf("image %s does not exist: %s", named.String(), res.Status)
105105
}
106106

107107
contentType := strings.ToLower(res.Header.Get("Content-Type"))
108108
if contentType != ociSpec.MediaTypeImageIndex && contentType != ociSpec.MediaTypeImageManifest && contentType != dockerListSpec.MediaTypeManifestList && contentType != dockerSpec.MediaTypeManifest {
109-
return res, fmt.Errorf("unexpected response content type %s", contentType)
109+
return res, fmt.Errorf("unexpected response content type %s for image %s", contentType, named.String())
110110
}
111111

112112
return res, nil

0 commit comments

Comments
 (0)