{"record":{"id":"27509a2f7be75d21","repo":"goharbor/harbor","slug":"invalid-url","errorCode":null,"errorMessage":"Invalid url","messagePattern":"Invalid url","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/volcenginecr/helper.go","lineNumber":34,"sourceCode":"\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n\n\t\"github.com/docker/distribution/registry/client/auth/challenge\"\n\n\t\"github.com/goharbor/harbor/src/lib/config\"\n\t\"github.com/goharbor/harbor/src/lib/log\"\n\t\"github.com/goharbor/harbor/src/pkg/reg/util\"\n)\n\nfunc getRegionRegistryName(url string) (string, string, error) {\n\treg := regexp.MustCompile(`https://(.*)\\.cr\\.volces|ivolces\\.com`)\n\trs := reg.FindStringSubmatch(url)\n\tif rs == nil || len(rs) != 2 {\n\t\treturn \"\", \"\", errors.New(\"Invalid url\")\n\t}\n\tregistryNameRegion := rs[1]\n\tfor regionReg := range regionRegs {\n\t\treg = regexp.MustCompile(regionReg)\n\t\tres := reg.FindStringSubmatch(registryNameRegion)\n\t\tif res == nil || len(res) != 3 {\n\t\t\tlog.Debug(\"fail to match\", \"reg\", regionReg)\n\t\t\tcontinue\n\t\t}\n\t\treturn res[2], res[1], nil\n\t}\n\n\treturn \"\", \"\", errors.New(\"invalid region\")\n}\n\nvar resolveHost = func(host string) string { return host }\n\nfunc getRealmService(host string, insecure bool, caCert string) (string, string, error) {","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/volcenginecr/helper.go#L16-L52","documentation":"Error \"Invalid url\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/volcenginecr/helper.go:34 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"}