{"record":{"id":"2026a763243e1a86","repo":"goharbor/harbor","slug":"invalid-scheme-s","errorCode":null,"errorMessage":"invalid scheme: %s","messagePattern":"invalid scheme: (.+?)","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"src/common/utils/utils.go","lineNumber":48,"sourceCode":"\n\tcronlib \"github.com/robfig/cron/v3\"\n\n\t\"github.com/goharbor/harbor/src/common\"\n\t\"github.com/goharbor/harbor/src/lib/log\"\n)\n\n// 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}\n\ti := strings.Index(endpoint, \"://\")\n\tif i >= 0 {\n\t\tscheme := endpoint[:i]\n\t\tif scheme != \"http\" && scheme != \"https\" {\n\t\t\treturn nil, fmt.Errorf(\"invalid scheme: %s\", scheme)\n\t\t}\n\t} else {\n\t\tendpoint = \"http://\" + endpoint\n\t}\n\n\treturn url.ParseRequestURI(endpoint)\n}\n\n// ParseRepository splits a repository into two parts: project and rest\nfunc ParseRepository(repository string) (project, rest string) {\n\trepository = strings.TrimLeft(repository, \"/\")\n\trepository = strings.TrimRight(repository, \"/\")\n\tif !strings.ContainsRune(repository, '/') {\n\t\trest = repository\n\t\treturn\n\t}\n\tproject, rest, _ = strings.Cut(repository, \"/\")\n\treturn","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/common/utils/utils.go#L30-L66","documentation":"Error \"invalid scheme: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/common/utils/utils.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}