windmill-labs/windmill · error
Failed to fetch resource types from hub: {}
Error message
Failed to fetch resource types from hub: {} What it means
At startup, Windmill's main caches hub resource types by fetching them from hub.windmill.dev. If the HTTP response returns a non-2xx status, the server bails with the upstream status code. This reflects a hub-side or network/gateway problem, not a local data problem.
Source
Thrown at backend/src/main.rs:450
skip_serializing_if = "Option::is_none"
)]
pub format_extension: Option<Option<String>>,
}
const HUB_RT_CACHE_FILE: &str = "resource_types.json";
async fn cache_hub_resource_types() -> anyhow::Result<()> {
println!("Caching resource types from hub...");
let response = HTTP_CLIENT
.get(format!("{}/resource_types/list", DEFAULT_HUB_BASE_URL))
.header("Accept", "application/json")
.send()
.await
.with_context(|| "Failed to fetch resource types from hub")?;
if !response.status().is_success() {
anyhow::bail!(
"Failed to fetch resource types from hub: {}",
response.status()
);
}
let raw_types: Vec<HubResourceTypeRaw> = response
.json::<Vec<HubResourceTypeRaw>>()
.await
.with_context(|| "Failed to parse resource types from hub")?;
// Parse schema strings into JSON values
let resource_types: Vec<HubResourceType> = raw_types
.into_iter()
.filter_map(|rt| {
let schema = match rt.schema {
Some(s) => match serde_json::from_str(&s) {
Ok(v) => Some(v),
Err(e) => {View on GitHub (pinned to e474e8803c)
Solutions
- Retry later; this is typically transient hub unavailability
- Check network/proxy egress to hub.windmill.dev from the server host
- Verify the hub base URL configuration if customized
- Run with self-contained resource types or skip hub sync if the deployment allows offline mode
Defensive patterns
Strategy: retry
Try / catch
let resp = loop {
match client.get(hub_url).header("Accept", "application/json").send().await {
Ok(r) if r.status().is_success() => break r,
Ok(r) => { warn!("hub fetch failed: {}", r.status()); }
Err(e) => warn!("hub fetch error: {e}"),
}
tokio::time::sleep(Duration::from_secs(30)).await;
}; Prevention
- Monitor egress to hub.windmill.dev from the server
- Wrap hub fetches with retry + backoff and a cached fallback
- Alert on non-2xx hub responses at startup
When it happens
Trigger: `cache_hub_resource_types` in windmill_main sends a GET with Accept: application/json to the hub and receives 4xx/5xx (404, 429, 502, 503, etc.).
Common situations: Hub outage or maintenance, rate limiting, corporate proxies/firewalls returning error pages, DNS hijacking captive portals, or a misconfigured hub base URL pointing at a non-hub host.
Related errors
- Couldn't fetch resource types from hub ${hubBaseUrl}: ${(awa
- Couldn't fetch resource types from public hub:
- ApiError with mapped HTTP status message (e.g. "Not Found",
- Generic Error: status: ${errorStatus}; status text: ${errorS
- GET assets/graph -> ${res.status}: ${await res.text()}
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/2e073a35ab55d289.
Report an issue: GitHub.