mirror of
https://github.com/docker/cli.git
synced 2026-09-27 17:56:04 -04:00
@@ -12,8 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func translateV2AuthError(err error) error {
|
||||
var e *url.Error
|
||||
if errors.As(err, &e) {
|
||||
if e, ok := errors.AsType[*url.Error](err); ok {
|
||||
var e2 errcode.Error
|
||||
if errors.As(e, &e2) && errors.Is(e2.Code, errcode.ErrorCodeUnauthorized) {
|
||||
return unauthorizedErr{err}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
|
||||
//go:build go1.26
|
||||
|
||||
package registryclient
|
||||
|
||||
import (
|
||||
@@ -244,8 +247,7 @@ func (c *client) iterateEndpoints(ctx context.Context, namedRef reference.Named,
|
||||
repo, err := c.getRepositoryForReference(ctx, namedRef, repoEndpoint)
|
||||
if err != nil {
|
||||
logrus.Debugf("error %s with repo endpoint %+v", err, repoEndpoint)
|
||||
var protoErr httpProtoError
|
||||
if errors.As(err, &protoErr) {
|
||||
if _, ok := errors.AsType[httpProtoError](err); ok {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user