windmill-labs/windmill · error · Error
Couldn't fetch resource types from public hub:
Error message
Couldn't fetch resource types from public hub:
What it means
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.
Source
Thrown at cli/src/commands/hub/hub.ts:96
": " +
(await res1.text())
);
}
}
let list = (await res1.json()) as HubResourceType[];
if (list && list.length === 0 && hubBaseUrl !== DEFAULT_HUB_BASE_URL) {
log.info(
"No resource types found in private hub, fetching from public hub"
);
delete headers["X-api-secret"];
const res2 = await fetch(DEFAULT_HUB_BASE_URL + "/resource_types/list", {
headers,
});
if (!res2.ok) {
throw new Error(
"Couldn't fetch resource types from public hub: " + (await res2.text())
);
}
list = (await res2.json()) as HubResourceType[];
}
const resourceTypes = await wmill.listResourceType({
workspace: workspace.workspaceId,
});
for (const x of list) {
try {
x.schema = JSON.parse(x.schema);
} catch (e) {
log.info("failed to parse schema for " + x.name);
continue;
}View on GitHub (pinned to e474e8803c)
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
Example fix
// verify reachability before pulling
const res = await fetch("https://hub.windmill.dev/resource_types/list");
if (!res.ok) console.error(res.status, await res.text());
// then retry: wmill hub pull Defensive patterns
Strategy: retry
Validate before calling
const res = await fetch("https://hub.windmill.dev/resource_types/list");
if (!res.ok) console.warn("Public hub degraded:", res.status); Try / catch
try {
await wmillHubPull();
} catch (e) {
if (String(e).includes("public hub")) {
// transient public-hub outage: retry with backoff
await sleep(5000);
await wmillHubPull();
}
} Prevention
- 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
When it happens
Trigger: '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).
Common situations: Public hub temporary outage or maintenance; corporate proxy/firewall blocking hub.windmill.dev; aggressive rate limiting after many pulls; DNS issues in CI containers.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Couldn't fetch resource types from hub ${hubBaseUrl}: ${(awa
- GET assets/graph -> ${res.status}: ${await res.text()}
- GET ${path} -> ${response.status}: ${body}
- Preview failed: ${response.status} - ${response.statusText}
- Got an HTML response from ${url} (status ${status}${cfPart ?
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/ac630f99912144ac.
Report an issue: GitHub.