{"record":{"id":"ea75543b5a9c8f19","repo":"goharbor/harbor","slug":"failed-to-fetch-artifacts-v","errorCode":null,"errorMessage":"failed to fetch artifacts: %v","messagePattern":"failed to fetch artifacts: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/replication/flow/stage.go","lineNumber":66,"sourceCode":"\t}\n\tdstAdapter, err = dstFactory.Create(policy.DestRegistry)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to create adapter for destination registry %s: %v\", policy.DestRegistry.URL, err)\n\t}\n\tlog.Debug(\"replication flow initialization completed\")\n\treturn srcAdapter, dstAdapter, nil\n}\n\n// fetch resources from the source registry\nfunc fetchResources(adapter adp.Adapter, policy *repctlmodel.Policy) ([]*model.Resource, error) {\n\tvar resources []*model.Resource\n\treg, ok := adapter.(adp.ArtifactRegistry)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"the adapter doesn't implement the ArtifactRegistry interface\")\n\t}\n\tres, err := reg.FetchArtifacts(policy.Filters)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to fetch artifacts: %v\", err)\n\t}\n\tresources = append(resources, res...)\n\n\tlog.Debug(\"fetch resources from the source registry completed\")\n\treturn resources, nil\n}\n\n// assemble the source resources by filling the registry information\nfunc assembleSourceResources(resources []*model.Resource,\n\tpolicy *repctlmodel.Policy) []*model.Resource {\n\tfor _, resource := range resources {\n\t\tresource.Registry = policy.SrcRegistry\n\t}\n\tlog.Debug(\"assemble the source resources completed\")\n\treturn resources\n}\n\n// assemble the destination resources by filling the metadata, registry and override properties","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/replication/flow/stage.go#L48-L84","documentation":"Error \"failed to fetch artifacts: %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/replication/flow/stage.go:66 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"}