{"record":{"id":"0d4e0963686bcbf9","repo":"goharbor/harbor","slug":"empty-url","errorCode":null,"errorMessage":"empty URL","messagePattern":"empty URL","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"src/common/utils/utils.go","lineNumber":42,"sourceCode":"// ParseEndpoint parses endpoint to a URL\nfunc ParseEndpoint(endpoint string) (*url.URL, error) {\n\tendpoint = strings.Trim(endpoint, \" \")\n\tendpoint = strings.TrimRight(endpoint, \"/\")\n\tif len(endpoint) == 0 {\n\t\treturn nil, fmt.Errorf(\"empty URL\")\n\t}","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/common/utils/utils.go#L24-L60","documentation":"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).","triggerScenarios":"Thrown at src/common/utils/utils.go:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a non-empty endpoint URL","Check client code isn't sending an unset/blank field","Add client-side required-field validation for endpoint inputs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}