{"record":{"id":"ac630f99912144ac","repo":"windmill-labs/windmill","slug":"couldn-t-fetch-resource-types-from-public-hub","errorCode":null,"errorMessage":"Couldn't fetch resource types from public hub: ","messagePattern":"Couldn't fetch resource types from public hub: ","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/hub/hub.ts","lineNumber":96,"sourceCode":"          \": \" +\n          (await res1.text())\n      );\n    }\n  }\n\n  let list = (await res1.json()) as HubResourceType[];\n\n  if (list && list.length === 0 && hubBaseUrl !== DEFAULT_HUB_BASE_URL) {\n    log.info(\n      \"No resource types found in private hub, fetching from public hub\"\n    );\n    delete headers[\"X-api-secret\"];\n    const res2 = await fetch(DEFAULT_HUB_BASE_URL + \"/resource_types/list\", {\n      headers,\n    });\n\n    if (!res2.ok) {\n      throw new Error(\n        \"Couldn't fetch resource types from public hub: \" + (await res2.text())\n      );\n    }\n\n    list = (await res2.json()) as HubResourceType[];\n  }\n\n  const resourceTypes = await wmill.listResourceType({\n    workspace: workspace.workspaceId,\n  });\n\n  for (const x of list) {\n    try {\n      x.schema = JSON.parse(x.schema);\n    } catch (e) {\n      log.info(\"failed to parse schema for \" + x.name);\n      continue;\n    }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/hub/hub.ts#L78-L114","documentation":"After successfully listing hub scripts, the CLI also fetches the public hub's resource-type list from DEFAULT_HUB_BASE_URL and throws this when that response is not OK, appending the response body. It always targets the built-in public hub, so the failure is on Windmill's hub side or in reaching it.","triggerScenarios":"'wmill hub pull' where the private-hub list succeeded but the follow-up request to DEFAULT_HUB_BASE_URL + '/resource_types/list' returns non-ok (e.g. 429 rate limit, 5xx outage, proxy block on the public hub domain).","commonSituations":"Public hub temporary outage or maintenance; corporate proxy/firewall blocking hub.windmill.dev; aggressive rate limiting after many pulls; DNS issues in CI containers.","solutions":["Check https://hub.windmill.dev status — a 5xx body means a Windmill-side outage; wait and retry","Verify your network/proxy allows hub.windmill.dev (curl the /resource_types/list endpoint)","If rate-limited, back off and retry later","Update the wmill CLI in case the public hub API path changed in an older version"],"exampleFix":"// verify reachability before pulling\nconst res = await fetch(\"https://hub.windmill.dev/resource_types/list\");\nif (!res.ok) console.error(res.status, await res.text());\n// then retry: wmill hub pull","handlingStrategy":"retry","validationCode":"const res = await fetch(\"https://hub.windmill.dev/resource_types/list\");\nif (!res.ok) console.warn(\"Public hub degraded:\", res.status);","typeGuard":null,"tryCatchPattern":"try {\n  await wmillHubPull();\n} catch (e) {\n  if (String(e).includes(\"public hub\")) {\n    // transient public-hub outage: retry with backoff\n    await sleep(5000);\n    await wmillHubPull();\n  }\n}","preventionTips":["Check hub.windmill.dev availability before CI pulls","Cache the last successful resource-type list as a fallback","Keep the wmill CLI updated so API paths match the current hub","Allowlist hub.windmill.dev in corporate proxies/firewalls"],"tags":["network","http","cli","hub"],"backgroundTag":"http-request-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}