{"record":{"id":"fa6a02b435057b17","repo":"hyperledger/fabric","slug":"collection-member-policy-is-not-set-for-collection","errorCode":null,"errorMessage":"collection member policy is not set for collection '%s'","messagePattern":"collection member policy is not set for collection '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/lifecycle/scc.go","lineNumber":834,"sourceCode":"\t\t\treturn errors.Errorf(\"collection-name: %s -- maximum peer count (%d) cannot be less than the required peer count (%d)\",\n\t\t\t\tc.Name, c.MaximumPeerCount, c.RequiredPeerCount)\n\t\t}\n\t\tif c.RequiredPeerCount < 0 {\n\t\t\treturn errors.Errorf(\"collection-name: %s -- requiredPeerCount (%d) cannot be less than zero\",\n\t\t\t\tc.Name, c.RequiredPeerCount)\n\t\t}\n\t\tif err := validateCollectionConfigMemberOrgsPolicy(c, mspMgr); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// validateCollectionConfigMemberOrgsPolicy checks whether the supplied collection configuration\n// complies to the given msp configuration\nfunc validateCollectionConfigMemberOrgsPolicy(coll *pb.StaticCollectionConfig, mspMgr msp.MSPManager) error {\n\tif coll.MemberOrgsPolicy == nil {\n\t\treturn errors.Errorf(\"collection member policy is not set for collection '%s'\", coll.Name)\n\t}\n\tif coll.MemberOrgsPolicy.GetSignaturePolicy() == nil {\n\t\treturn errors.Errorf(\"collection member org policy is empty for collection '%s'\", coll.Name)\n\t}\n\n\t// calling this constructor ensures extra semantic validation for the policy\n\tpp := &cauthdsl.EnvelopeBasedPolicyProvider{Deserializer: mspMgr}\n\tif _, err := pp.NewPolicy(coll.MemberOrgsPolicy.GetSignaturePolicy()); err != nil {\n\t\treturn errors.WithMessagef(err, \"invalid member org policy for collection '%s'\", coll.Name)\n\t}\n\n\t// make sure that the signature policy is meaningful (only consists of ORs)\n\tif err := validateSpOrConcat(coll.MemberOrgsPolicy.GetSignaturePolicy().Rule); err != nil {\n\t\treturn errors.WithMessagef(err, \"collection-name: %s -- error in member org policy\", coll.Name)\n\t}\n\n\tmsps, err := mspMgr.GetMSPs()\n\tif err != nil {","sourceCodeStart":816,"sourceCodeEnd":852,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/lifecycle/scc.go#L816-L852","documentation":"Returned by validateCollectionConfigMemberOrgsPolicy when a static collection defines no member-org policy. Every private collection must declare which orgs can access the data; the nil check fires before signature-policy validation can run.","triggerScenarios":"Thrown at core/chaincode/lifecycle/scc.go:834 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a member_orgs_policy (signature policy over member orgs) to the collection config"],"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"}