{"record":{"id":"abe9d4299bdbba73","repo":"goharbor/harbor","slug":"failed-to-list-projects-at-page-d-with-page-size","errorCode":null,"errorMessage":"failed to list projects at page %d with page size %d, error :%v","messagePattern":"failed to list projects at page (.+?) with page size (.+?), error :(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/project/util.go","lineNumber":46,"sourceCode":"\tError error\n}\n\n// ListAll returns all projects with chunk support\nfunc ListAll(ctx context.Context, chunkSize int, query *q.Query, options ...Option) <-chan Result {\n\tch := make(chan Result, chunkSize)\n\n\tgo func() {\n\t\tdefer close(ch)\n\n\t\tquery = q.MustClone(query)\n\t\tquery.PageNumber = 1\n\t\tquery.PageSize = int64(chunkSize)\n\n\t\tfor {\n\t\t\tprojects, err := Ctl.List(ctx, query, options...)\n\t\t\tif err != nil {\n\t\t\t\tformat := \"failed to list projects at page %d with page size %d, error :%v\"\n\t\t\t\tch <- Result{Error: fmt.Errorf(format, query.PageNumber, query.PageSize, err)}\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfor _, p := range projects {\n\t\t\t\tch <- Result{Data: p}\n\t\t\t}\n\n\t\t\tif len(projects) < chunkSize {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tquery.PageNumber++\n\t\t}\n\t}()\n\n\treturn ch\n}\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/project/util.go#L28-L64","documentation":"Error \"failed to list projects at page %d with page size %d, error :%v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/project/util.go:46 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"}