{"record":{"id":"f3d23d05e9733c58","repo":"hyperledger/fabric","slug":"must-supply-channel-id-f3d23d","errorCode":null,"errorMessage":"Must supply channel ID","messagePattern":"Must supply channel ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/node/pause.go","lineNumber":30,"sourceCode":"\t\"github.com/pkg/errors\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc pauseCmd() *cobra.Command {\n\tpauseChannelCmd.ResetFlags()\n\tflags := pauseChannelCmd.Flags()\n\tflags.StringVarP(&channelID, \"channelID\", \"c\", common.UndefinedParamValue, \"Channel to pause.\")\n\n\treturn pauseChannelCmd\n}\n\nvar pauseChannelCmd = &cobra.Command{\n\tUse:   \"pause\",\n\tShort: \"Pauses a channel on the peer.\",\n\tLong:  `Pauses a channel on the peer. When the command is executed, the peer must be offline. When the peer starts after pause, it will not receive blocks for the paused channel.`,\n\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\tif channelID == common.UndefinedParamValue {\n\t\t\treturn errors.New(\"Must supply channel ID\")\n\t\t}\n\n\t\tconfig := ledgerConfig()\n\t\treturn kvledger.PauseChannel(config.RootFSPath, channelID)\n\t},\n}\n","sourceCodeStart":12,"sourceCodeEnd":37,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/node/pause.go#L12-L37","documentation":"The `peer node pause` command pauses a channel on an offline peer, but it requires the channel ID via --channelID (or -c). If the channelID flag is unset (the UndefinedParamValue sentinel), RunE returns this error and the channel is not paused.","triggerScenarios":"Running `peer node pause` without providing --channelID / -c.","commonSituations":"Forgot the -c flag; misspelled flag name so it is not parsed into channelID; scripting the pause of many channels and omitting the variable holding the channel name.","solutions":["Re-run with the channel: `peer node pause -c <channelID>` (peer must be offline).","Verify the flag is spelled `--channelID` (case-sensitive) so it binds to channelID.","Check your script/env var actually contains the channel name, not an empty string."],"exampleFix":"// before\npeer node pause\n// after\npeer node pause -c mychannel","handlingStrategy":"validation","validationCode":"if [ -z \"$CHANNEL\" ]; then echo \"usage: peer node pause -c <channelID>\" >&2; exit 1; fi\npeer node pause -c \"$CHANNEL\"","typeGuard":null,"tryCatchPattern":"if err := runPause(); err != nil && err.Error() == \"Must supply channel ID\" {\n    return fmt.Errorf(\"usage: peer node pause -c <channelID>\")\n}","preventionTips":["Always pass -c/--channelID explicitly; never rely on defaults.","Wrap commands in scripts that validate non-empty channel IDs first.","Note the flag name is case-sensitive: --channelID."],"tags":["fabric","peer-cli","channel-management"],"backgroundTag":"missing-channel-id","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"}