charmbracelet/crush · warning
empty providers list from catwalk
Error message
empty providers list from catwalk
What it means
The catwalk-backed provider catalog fetcher sets this error when the remote catalog service returns a successful response containing zero providers. An empty catalog is treated as a broken response rather than a valid state: the fetcher keeps serving the previously cached catalog (s.result = cached) and stores this error so callers know the refresh failed while still having usable data.
Source
Thrown at internal/config/catwalk.go:79
s.result = cached
return
}
if errors.Is(err, catwalk.ErrNotModified) {
slog.Info("Catwalk providers not modified")
s.result = cached
return
}
if err != nil {
// Fall back to cached (which defaults to embedded if empty).
// Being offline is routine and the fallback is sound, so this
// is logged rather than reported to the caller.
slog.Warn("Could not fetch providers from Catwalk", "error", err)
s.result = cached
return
}
if len(result) == 0 {
s.result = cached
s.err = errors.New("empty providers list from catwalk")
return
}
// The catalog is usable from here on. A cache write failure only
// costs the next run a refresh, so it is reported alongside a valid
// result rather than in place of one.
s.result = result
s.err = s.cache.Store(result)
})
return s.result, s.err
}
View on GitHub (pinned to 7944b8e522)
Solutions
- Retry later — cached providers keep working in the meantime; the next successful refresh clears the error.
- Verify the configured Catwalk URL is correct and reachable (curl it and confirm a non-empty provider list).
- Check proxy/firewall interference and any cached empty responses; force a refresh after fixing connectivity.
Example fix
// before CRUSH_CATWALK_URL=https://wrong-mirror.example.com crush // after unset CRUSH_CATWALK_URL # use the default catwalk endpoint crush
Defensive patterns
Strategy: retry
Validate before calling
// Sanity-check the catalog endpoint before startup curl -fsS "$CATWALK_URL/providers" | jq 'length' # must be > 0
Try / catch
s.refresh(ctx)
if s.err != nil && s.result != nil {
slog.Warn("Using cached providers after failed refresh", "error", s.err) // degrade, don't abort
} Prevention
- Point the catalog at the official Catwalk URL or a verified mirror that serves a non-empty list.
- Rely on the built-in cache: an empty fetch degrades to cached providers rather than breaking startup.
- Monitor proxy/firewall rules that could strip or replace API responses.
When it happens
Trigger: A refresh cycle where the Catwalk /providers endpoint returns an empty JSON array; transient server-side issues or a misconfigured/empty upstream catalog; network proxies stripping the body.
Common situations: Catwalk outage or partial degradation returning empty lists; corporate proxies intercepting responses; pointing a custom catalog URL at an endpoint that legitimately serves no providers.
Related errors
- failed to make request: %w
- failed to read response: %w
- failed to get LSP diagnostics: %w
- failed to get LSPs: %w
- failed to get MCP states: %w
AI-assisted analysis of charmbracelet/crush@7944b8e522 (2026-08-29).
Data as JSON: /api/errors/169299b1fb40e596.
Report an issue: GitHub.