{"record":{"id":"19ed1550af8306e3","repo":"goharbor/harbor","slug":"not-a-acr-service","errorCode":null,"errorMessage":"not a acr service","messagePattern":"not a acr service","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/aliacr/adapter.go","lineNumber":83,"sourceCode":"\trs := regACRServiceURL.FindStringSubmatch(url)\n\tif rs == nil {\n\t\treturn url, nil\n\t}\n\treturn fmt.Sprintf(registryEndpointTpl, rs[1]), nil\n}\n\n// example:\n// registry.aliyuncs.com:cn-hangzhou:china:cri-xxxxxxxxx\n// registry.aliyuncs.com:cn-hangzhou:26842\nfunc parseRegistryService(service string) (*registryServiceInfo, error) {\n\tparts := strings.Split(service, \":\")\n\tlength := len(parts)\n\tif length < 2 {\n\t\treturn nil, errors.New(\"invalid service format: expected 'registry.aliyuncs.com:region:xxxxx'\")\n\t}\n\n\tif !strings.EqualFold(parts[0], registryACRService) {\n\t\treturn nil, errors.New(\"not a acr service\")\n\t}\n\n\tif strings.HasPrefix(parts[length-1], \"cri-\") {\n\t\treturn &registryServiceInfo{\n\t\t\tIsACREE:    true,\n\t\t\tRegionID:   parts[1],\n\t\t\tInstanceID: parts[length-1],\n\t\t}, nil\n\t}\n\treturn &registryServiceInfo{\n\t\tIsACREE:  false,\n\t\tRegionID: parts[1],\n\t}, nil\n}\n\nfunc newAdapter(registry *model.Registry) (*adapter, error) {\n\turl, err := getRegistryURL(registry.URL)\n\tif err != nil {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/aliacr/adapter.go#L65-L101","documentation":"Error \"not a acr service\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/aliacr/adapter.go:83 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"}