router-for-me/CLIProxyAPI · error

request %s failed: %w

Error message

request %s failed: %w

What it means

The HTTP request to the plugin store / GitHub release endpoint failed at the transport level. The helper sanitizes the URL (strips user info, query, fragment) and unwraps *url.Error before wrapping, so the message shows a safe URL plus the underlying error (DNS failure, timeout, TLS, connection refused). It is the generic network-failure envelope for all plugin store HTTP calls.

Source

Thrown at internal/pluginstore/github.go:303

	}
	return data, nil
}

func pluginStoreRequestError(requestURL string, err error) error {
	parsed, errParse := url.Parse(strings.TrimSpace(requestURL))
	safeURL := "plugin store url"
	if errParse == nil && parsed.Scheme != "" && parsed.Host != "" {
		parsed.User = nil
		parsed.RawQuery = ""
		parsed.ForceQuery = false
		parsed.Fragment = ""
		safeURL = parsed.String()
	}
	var urlError *url.Error
	if errors.As(err, &urlError) && urlError.Err != nil {
		err = urlError.Err
	}
	return fmt.Errorf("request %s failed: %w", safeURL, err)
}

func SelectReleaseAssets(release Release, id, version, goos, goarch string) (ReleaseAsset, ReleaseAsset, error) {
	archiveName := ArchiveName(id, version, goos, goarch)
	var archiveAsset ReleaseAsset
	var checksumAsset ReleaseAsset
	for _, asset := range release.Assets {
		switch strings.TrimSpace(asset.Name) {
		case archiveName:
			archiveAsset = asset
		case "checksums.txt":
			checksumAsset = asset
		}
	}
	if strings.TrimSpace(archiveAsset.Name) == "" {
		return ReleaseAsset{}, ReleaseAsset{}, fmt.Errorf("release asset %s not found", archiveName)
	}
	if strings.TrimSpace(checksumAsset.Name) == "" {

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Verify network egress to the host named in the error (curl the sanitized URL shown in the message)
  2. Fix proxy/CA configuration (set HTTPS_PROXY or add the corporate CA to the trust store)
  3. Retry transient failures — network errors are often intermittent; the store client treats them as retryable
  4. If the URL looks wrong, correct the plugin source/repo configuration in the manifest
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight reachability check before install flows.
if _, errPing := http.Head(storeURL); errPing != nil {
    return fmt.Errorf("plugin store unreachable, check network: %w", errPing)
}

Try / catch

var urlErr *url.Error
if errors.As(err, &urlErr) {
    // transport-level failure: safe to retry with backoff; abort on context.Canceled
}

Prevention

When it happens

Trigger: Any plugin store HTTP request (release fetch, asset download) when the underlying http.Client request returns an error: no network, DNS resolution failure, proxy misconfiguration, TLS handshake failure, or context cancellation.

Common situations: Running in an offline/CI sandbox without egress to github.com; corporate MITM proxy with an untrusted CA; mistyped plugin store base URL; context cancelled mid-download.

Related errors


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/dbd3dd6d9d0875ac. Report an issue: GitHub.