{"record":{"id":"f0aa9a4b3718ec60","repo":"hyperledger/fabric","slug":"nil-config-parameter","errorCode":null,"errorMessage":"nil config parameter","messagePattern":"nil config parameter","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/configtx/validator.go","lineNumber":104,"sourceCode":"\t\treturn errors.Errorf(\"channel ID illegal, cannot be empty\")\n\t}\n\tif len(channelID) > MaxLength {\n\t\treturn errors.Errorf(\"channel ID illegal, cannot be longer than %d\", MaxLength)\n\t}\n\n\t// Illegal characters\n\tmatched := re.FindString(channelID)\n\tif len(matched) != len(channelID) {\n\t\treturn errors.Errorf(\"'%s' contains illegal characters\", channelID)\n\t}\n\n\treturn nil\n}\n\n// NewValidatorImpl constructs a new implementation of the Validator interface.\nfunc NewValidatorImpl(channelID string, config *cb.Config, namespace string, pm policies.Manager) (*ValidatorImpl, error) {\n\tif config == nil {\n\t\treturn nil, errors.Errorf(\"nil config parameter\")\n\t}\n\n\tif config.ChannelGroup == nil {\n\t\treturn nil, errors.Errorf(\"nil channel group\")\n\t}\n\n\tif err := ValidateChannelID(channelID); err != nil {\n\t\treturn nil, errors.Errorf(\"bad channel ID: %s\", err)\n\t}\n\n\tconfigMap, err := mapConfig(config.ChannelGroup, namespace)\n\tif err != nil {\n\t\treturn nil, errors.Errorf(\"error converting config to map: %s\", err)\n\t}\n\n\treturn &ValidatorImpl{\n\t\tnamespace:   namespace,\n\t\tpm:          pm,","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/configtx/validator.go#L86-L122","documentation":"Returned by NewValidatorImpl when the *cb.Config argument is nil. It is an argument-contract guard: the validator needs an existing config to compute and validate deltas against, so a nil baseline config is rejected immediately.","triggerScenarios":"Thrown at common/configtx/validator.go:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-nil config when constructing the validator","Trace the caller to find why the config is nil"],"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-08T15:18:49.778Z"}