{"record":{"id":"f34cc27d646d7e86","repo":"goharbor/harbor","slug":"d-s-f34cc2","errorCode":null,"errorMessage":"[%d][%s]","messagePattern":"\\[%d\\]\\[%s\\]","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/huawei/image_registry.go","lineNumber":52,"sourceCode":"\turls := fmt.Sprintf(\"%s/dockyard/v2/repositories?filter=center::self\", a.registry.URL)\n\n\tr, err := http.NewRequest(http.MethodGet, urls, nil)\n\tif err != nil {\n\t\treturn resources, err\n\t}\n\n\tr.Header.Add(\"content-type\", \"application/json; charset=utf-8\")\n\n\tresp, err := a.client.Do(r)\n\tif err != nil {\n\t\treturn resources, err\n\t}\n\n\tdefer resp.Body.Close()\n\tcode := resp.StatusCode\n\tif code >= 300 || code < 200 {\n\t\tbody, _ := io.ReadAll(resp.Body)\n\t\treturn resources, fmt.Errorf(\"[%d][%s]\", code, string(body))\n\t}\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn resources, err\n\t}\n\trepos := []hwRepoQueryResult{}\n\terr = json.Unmarshal(body, &repos)\n\tif err != nil {\n\t\treturn resources, err\n\t}\n\tfor _, repo := range repos {\n\t\tresource := parseRepoQueryResultToResource(repo)\n\t\tresource.Registry = a.registry\n\t\tresources = append(resources, resource)\n\t}\n\treturn resources, nil\n}\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/huawei/image_registry.go#L34-L70","documentation":"Error \"[%d][%s]\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/huawei/image_registry.go:52 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"}