{"record":{"id":"d674316c95ea3ae6","repo":"hyperledger/fabric","slug":"bad-channel-id-s","errorCode":null,"errorMessage":"bad channel ID: %s","messagePattern":"bad channel ID: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/configtx/validator.go","lineNumber":112,"sourceCode":"\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,\n\t\tsequence:    config.Sequence,\n\t\tconfigMap:   configMap,\n\t\tchannelID:   channelID,\n\t\tconfigProto: config,\n\t}, nil\n}\n\n// ProposeConfigUpdate takes in an Envelope of type CONFIG_UPDATE and produces a","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/configtx/validator.go#L94-L130","documentation":"Returned by NewValidatorImpl when ValidateChannelID rejects the supplied channel ID (empty, too long, or containing illegal characters). The underlying validation error is wrapped with this prefix, tying the failure to the ID/config binding.","triggerScenarios":"Thrown at common/configtx/validator.go:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the channel ID per the wrapped error (non-empty, <=Maxlength, allowed chars only)","Use a conforming channel name when creating or joining the channel"],"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"}