You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fetching referrers in an OCI registry that does not support the referrers API, an error is returned before handling the exception for errors in retrieving referrers.
When trying to get referrers for an image with no referrers, an transport.Error error is returned directly.
call remote.Referrers on an image with the following conditions:
registered in an OCI registry that does not support the referrers API
the image has no referrers
For further details, see the test in the following PR: #1648
Expected behavior
Return an empty manifest when the OCI registry returns a 404.
Additional context
I've been developing a tool that uses referrers API. I noticed that I need extra error handling when fetching referrers for an OCI registry that does not support referrers API.
Describe the bug
When fetching referrers in an OCI registry that does not support the referrers API, an error is returned before handling the exception for errors in retrieving referrers.
When trying to get referrers for an image with no referrers, an transport.Error error is returned directly.
go-containerregistry/pkg/v1/remote/descriptor.go
Lines 330 to 344 in ed5c185
To Reproduce
call
remote.Referrers
on an image with the following conditions:For further details, see the test in the following PR:
#1648
Expected behavior
Return an empty manifest when the OCI registry returns a 404.
Additional context
I've been developing a tool that uses referrers API. I noticed that I need extra error handling when fetching referrers for an OCI registry that does not support referrers API.
aquasecurity/trivy-plugin-referrer#7
The text was updated successfully, but these errors were encountered: