{"record":{"id":"9f4869569c33d83d","repo":"zeroclaw-labs/zeroclaw","slug":"plugin-registry-returned-http-status-for-regist","errorCode":null,"errorMessage":"plugin registry returned HTTP {status} for {registry_url}","messagePattern":"plugin registry returned HTTP (.+?) for (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/plugin_registry.rs","lineNumber":69,"sourceCode":"        || source.contains('\\\\')\n}\n\npub(crate) fn looks_like_url(source: &str) -> bool {\n    source.contains(\"://\")\n}\n\npub(crate) async fn fetch_registry_index(registry_url: &str) -> Result<PluginRegistryIndex> {\n    let response = reqwest::get(registry_url)\n        .await\n        .with_context(|| format!(\"fetching plugin registry {registry_url}\"))?;\n    let status = response.status();\n    if !status.is_success() {\n        if status == reqwest::StatusCode::NOT_FOUND && registry_url == DEFAULT_REGISTRY_URL {\n            bail!(\n                \"the public plugin registry is not populated yet; use --registry <url> to point at a custom registry\"\n            );\n        }\n        bail!(\"plugin registry returned HTTP {status} for {registry_url}\");\n    }\n    response\n        .json::<PluginRegistryIndex>()\n        .await\n        .context(\"parsing plugin registry JSON\")\n}\n\npub(crate) async fn download_registry_plugin(\n    registry_url: &str,\n    source: &str,\n    cache_data_dir: Option<&Path>,\n) -> Result<DownloadedPlugin> {\n    let index = fetch_registry_index(registry_url).await?;\n    if let Some(data_dir) = cache_data_dir {\n        write_cached_registry_index(data_dir, registry_url, &index)?;\n    }\n    let spec = parse_plugin_spec(source)?;\n    let entry = resolve_entry(&index, &spec)?.clone();","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/plugin_registry.rs#L51-L87","documentation":"The plugin registry index fetch succeeded at the transport level but returned a non-success HTTP status. This is the generic branch: any status other than 2xx that is not the special-cased default-URL 404 (error 1406) bails here with the concrete status code and URL.","triggerScenarios":"GET on the registry index URL returning 401/403 (auth required), 404 for a custom registry (wrong path), 429 (rate limit), 5xx (registry down), or a redirect chain ending in an error. Triggered by download_registry_plugin via fetch_registry_index.","commonSituations":"Typo'd or outdated --registry URL (404); private registry needing a token (401/403); rate-limited CI hitting the registry repeatedly (429); registry outage or maintenance (502/503).","solutions":["Check the status code in the message: 404 means the URL/path is wrong, 401/403 means credentials are needed, 429/5xx means back off and retry","Verify the registry URL resolves and serves the index (curl -I <url>)","Add a secret/token mechanism if the registry requires auth — do not bake tokens into the URL in shared configs","Retry with backoff for 429/5xx; the index fetch is idempotent"],"exampleFix":"# before\nzeroclaw plugin install p --registry https://reg.example/plugins   # 404\n\n# after\ncurl -I https://reg.example/registry/index.json   # confirm 200\nzeroclaw plugin install p --registry https://reg.example/registry/index.json","handlingStrategy":"retry","validationCode":"// Cheap reachability + status probe of the registry before running installs:\nlet s = reqwest::get(&registry_url).await?.status();\nif !s.is_success() { /* skip/defer install, alert on 5xx, fix URL on 404 */ }","typeGuard":null,"tryCatchPattern":"// Retry with exponential backoff ONLY for 429/5xx; treat 401/403 as config\n// errors (credentials) and 404 as a wrong URL. Parse the numeric status from\n// the 'plugin registry returned HTTP {status}' message.","preventionTips":["Cache the registry index locally between runs","Rate-limit install jobs to avoid 429 in CI","Validate custom registry URLs once at config load"],"tags":["plugin-registry","http-status","network","install"],"backgroundTag":"http-error-status","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}