{"record":{"id":"ecca95bd893adc3c","repo":"hyperledger/fabric","slug":"applicationorg-config-does-not-allow-sub-groups","errorCode":null,"errorMessage":"ApplicationOrg config does not allow sub-groups","messagePattern":"ApplicationOrg config does not allow sub-groups","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/channelconfig/applicationorg.go","lineNumber":37,"sourceCode":"\tAnchorPeersKey = \"AnchorPeers\"\n)\n\n// ApplicationOrgProtos are deserialized from the config\ntype ApplicationOrgProtos struct {\n\tAnchorPeers *pb.AnchorPeers\n}\n\n// ApplicationOrgConfig defines the configuration for an application org\ntype ApplicationOrgConfig struct {\n\t*OrganizationConfig\n\tprotos *ApplicationOrgProtos\n\tname   string\n}\n\n// NewApplicationOrgConfig creates a new config for an application org\nfunc NewApplicationOrgConfig(id string, orgGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationOrgConfig, error) {\n\tif len(orgGroup.Groups) > 0 {\n\t\treturn nil, fmt.Errorf(\"ApplicationOrg config does not allow sub-groups\")\n\t}\n\n\tprotos := &ApplicationOrgProtos{}\n\torgProtos := &OrganizationProtos{}\n\n\tif err := DeserializeProtoValuesFromGroup(orgGroup, protos, orgProtos); err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to deserialize values\")\n\t}\n\n\taoc := &ApplicationOrgConfig{\n\t\tname:   id,\n\t\tprotos: protos,\n\t\tOrganizationConfig: &OrganizationConfig{\n\t\t\tname:             id,\n\t\t\tprotos:           orgProtos,\n\t\t\tmspConfigHandler: mspConfig,\n\t\t},\n\t}","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/channelconfig/applicationorg.go#L19-L55","documentation":"Returned by NewApplicationOrgConfig when the application org's ConfigGroup contains sub-groups. Application org groups are leaf nodes in the channel config tree — only values (like AnchorPeers) are allowed, so any child Groups entry is rejected as structurally invalid config.","triggerScenarios":"Thrown at common/channelconfig/applicationorg.go:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove nested groups from the application org group in the channel config","Regenerate the config transaction from a corrected configtx.yaml profile"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}