goharbor/harbor · error
invalid scheme
Error message
invalid scheme: %s
What it means
Sentinel validation error in ParseEndpoint: the endpoint contains a scheme separator but the scheme is neither http nor https (e.g. ftp://, tcp://). It fires for URLs whose scheme is unsupported, naming the offending scheme.
Solutions
- Use an http:// or https:// endpoint URL
- Correct the URL scheme typo in the configuration or API payload
- Omit the scheme entirely to default to http://
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/common/utils/utils.go:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/2026a763243e1a86.
Report an issue: GitHub.
Appendix: source
Thrown at src/common/utils/utils.go:48
func ParseEndpoint(endpoint string) (*url.URL, error) {
endpoint = strings.Trim(endpoint, " ")
endpoint = strings.TrimRight(endpoint, "/")
if len(endpoint) == 0 {
return nil, fmt.Errorf("empty URL")
}
i := strings.Index(endpoint, "://")
if i >= 0 {
scheme := endpoint[:i]
if scheme != "http" && scheme != "https" {
return nil, fmt.Errorf("invalid scheme: %s", scheme)
}
} else {
endpoint = "http://" + endpoint
}View on GitHub (pinned to 7b2fd08cc5)