question: Can the remote.Referrers function be updated to handle a 406 response when attempting a request against the referrers API endpoint? #1962
Labels
question
Further information is requested
When the remote.Referrers function fetches a list of referrers for a manifest, it first attempts to make a request to the
referrers
API endpoint. If that fails, it falls back to making a request to themanifests
endpoint using the referrers tag schema.While using this function with a registry that does not support the
referrers
API endpoint, I found the function was unexpectedly failing. Digging into the error, I found the registry was returning a 406 instead of a 404 when the function attempted to make a request to thereferrers
endpoint. Addinghttp.StatusNotAcceptable
to the list of handled status codes in transport.CheckError here fixed the problem for me.Would it be possible to add
http.StatusNotAcceptable
to the list of status codes handled by transport.CheckError? Since it is a 4XX error, theReferrers
is able to fallback and try themanifests
API endpoint.The text was updated successfully, but these errors were encountered: