goharbor/harbor · error

empty URL

Error message

empty URL

What it means

Sentinel validation error in ParseEndpoint: the endpoint string is empty (or only spaces/trailing slashes) after trimming, so no URL can be parsed. It fires for blank endpoint inputs wherever ParseEndpoint is used (e.g. registry URLs, webhook targets).

Solutions

  1. Supply a non-empty endpoint URL
  2. Check client code isn't sending an unset/blank field
  3. Add client-side required-field validation for endpoint inputs
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/common/utils/utils.go:42 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/0d4e0963686bcbf9. Report an issue: GitHub.

Appendix: source

Thrown at src/common/utils/utils.go:42

// ParseEndpoint parses endpoint to a URL
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")
	}

View on GitHub (pinned to 7b2fd08cc5)