{"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":"getRegionRegistryName cannot match the registry URL against the 'https://<name>.cr.volces|ivolces.com' pattern (no or malformed capture group), so the URL is not a recognizable Volcengine CR endpoint and region/registry name cannot be derived.","triggerScenarios":"Thrown at src/pkg/reg/adapter/volcenginecr/helper.go:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the registry URL in the canonical https://<name>.cr.volces.com form","Use the exact endpoint shown in the Volcengine console"],"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"}