code: func TranslatePullError(err error, ref reference.Named) error {
  	switch v := err.(type) {
  	case errcode.Errors:
  		if len(v) != 0 {
  			for _, extra := range v[1:] {
  				logrus.Infof("Ignoring extra error returned from registry: %v", extra)
  			}
  			return TranslatePullError(v[0], ref)
  		}
  	case errcode.Error:
  		switch v.Code {
  		case errcode.ErrorCodeDenied, v2.ErrorCodeManifestUnknown, v2.ErrorCodeNameUnknown:
  			return notFoundError{v, ref}
  		}
  	case xfer.DoNotRetry:
  		return TranslatePullError(v.Err, ref)
  	}
  
  	return errdefs.Unknown(err)
  }
docs: // TranslatePullError is used to convert an error from a registry pull
  // operation to an error representing the entire pull operation. Any error
  // information which is not used by the returned error gets output to
  // log at info level.