JuliusBrussee/caveman · error
/ : invalid HTTPS source
Error message
%s %s/%s: invalid HTTPS source %q
What it means
DecodeAndValidate validates each entry's source URLs with url.ParseRequestURI and requires https scheme plus a non-empty host. Any http://, ftp://, schemeless, or malformed URL fails closed. This prevents catalog provenance from pointing at insecure or bogus endpoints.
Solutions
- Change the offending source URL to a fully qualified https:// URL with a hostname.
- Strip surrounding whitespace and fix typos in the URL string.
- Validate locally with url.ParseRequestURI before committing the catalog.
- Re-run DecodeAndValidate to confirm all entries pass.
Example fix
// before "sources": ["http://example.com/model-docs"] // after "sources": ["https://example.com/model-docs"]
Defensive patterns
Strategy: validation
Validate before calling
for _, s := range entry.Sources {
u, err := url.ParseRequestURI(strings.TrimSpace(s))
if err != nil || u.Scheme != "https" || u.Host == "" {
return fmt.Errorf("source %q must be absolute https URL", s)
}
} Try / catch
decoded, err := catalog.DecodeAndValidate(raw, label)
if err != nil {
if strings.Contains(err.Error(), "invalid HTTPS source") {
return fmt.Errorf("fix the cited source URL: %w", err)
}
return err
} Prevention
- Copy documentation URLs directly from the browser address bar (always https).
- Lint catalog source URLs in CI with the same ParseRequestURI+https check.
- Trim whitespace before storing URLs in the catalog.
When it happens
Trigger: Calling DecodeAndValidate on a catalog entry whose sources contain e.g. "http://example.com/model", "example.com/model", "https://" (no host), or a string with spaces/typos that fails ParseRequestURI.
Common situations: Copy-pasting a URL and losing the 's' in https; writing a relative or bare-domain link; trailing whitespace or embedded quotes; an internal doc link that was never a real URL.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- : every source must be HTTPS
- catalog
- duplicate provider/model/region row
- invalid_endpoint
- invalid_endpoint
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/04164ecae154fdf9.
Report an issue: GitHub.
Appendix: source
Thrown at shared/platform/catalog/catalog.go:353
if verified.After(time.Now().UTC().Add(24 * time.Hour)) {
return nil, fmt.Errorf("%s %s/%s: verified_at is in the future", label, entry.Provider, entry.Model)
}
if entry.CapabilitiesVerifiedAt != "" {
capVerified, err := time.Parse(time.RFC3339, entry.CapabilitiesVerifiedAt)
if err != nil || capVerified.IsZero() {
return nil, fmt.Errorf("%s %s/%s: capabilities_verified_at must be RFC3339", label, entry.Provider, entry.Model)
}
if capVerified.After(time.Now().UTC().Add(24 * time.Hour)) {
return nil, fmt.Errorf("%s %s/%s: capabilities_verified_at is in the future", label, entry.Provider, entry.Model)
}
}
if len(entry.Sources) == 0 {
return nil, fmt.Errorf("%s %s/%s: at least one source is required", label, entry.Provider, entry.Model)
}
for _, rawURL := range entry.Sources {
u, err := url.ParseRequestURI(rawURL)
if err != nil || u.Scheme != "https" || u.Host == "" {
return nil, fmt.Errorf("%s %s/%s: invalid HTTPS source %q", label, entry.Provider, entry.Model, rawURL)
}
}
key := entry.Provider + "\x00" + entry.Model + "\x00" + entry.Region
if _, duplicate := seen[key]; duplicate {
return nil, fmt.Errorf("duplicate provider/model/region row %s/%s@%s", entry.Provider, entry.Model, entry.Region)
}
seen[key] = struct{}{}
}
return decoded, nil
}
// catalogCandidates lists the paths to try, in order: an explicit env override,
// the deploy-image and CWD-relative locations, then a walk up from the working
// directory so the catalog resolves when binaries or tests run from subdirs.
// Both repo layouts are tried: the monorepo keeps the catalog under public/,
// the published caveman repo has it at the top level.
func catalogCandidates() []string {
rels := []string{View on GitHub (pinned to 3ee70a1026)