{"record":{"id":"8d089d7eb77ab9c3","repo":"hyperledger/fabric","slug":"must-supply-channel-id-8d089d","errorCode":null,"errorMessage":"Must supply channel ID","messagePattern":"Must supply channel ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/node/resume.go","lineNumber":30,"sourceCode":"\t\"github.com/pkg/errors\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc resumeCmd() *cobra.Command {\n\tresumeChannelCmd.ResetFlags()\n\tflags := resumeChannelCmd.Flags()\n\tflags.StringVarP(&channelID, \"channelID\", \"c\", common.UndefinedParamValue, \"Channel to resume.\")\n\n\treturn resumeChannelCmd\n}\n\nvar resumeChannelCmd = &cobra.Command{\n\tUse:   \"resume\",\n\tShort: \"Resumes a channel on the peer.\",\n\tLong:  `Resumes a channel on the peer. When the command is executed, the peer must be offline. When the peer starts after resume, it will receive blocks for the resumed 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.ResumeChannel(config.RootFSPath, channelID)\n\t},\n}\n","sourceCodeStart":12,"sourceCodeEnd":37,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/node/resume.go#L12-L37","documentation":"The `peer node resume` command resumes a previously paused channel on an offline peer and, like pause, mandates a channel ID. When channelID equals common.UndefinedParamValue (flag not supplied), RunE aborts with this error before calling kvledger.ResumeChannel.","triggerScenarios":"Running `peer node resume` without --channelID / -c.","commonSituations":"Omitting -c after maintenance; flag typo; passing an empty variable in an automation script during channel maintenance windows.","solutions":["Re-run with the channel: `peer node resume -c <channelID>` (peer must be offline).","Confirm the flag name `--channelID` is correctly spelled and parsed.","Ensure the scripted variable holding the channel name is non-empty before invoking the command."],"exampleFix":"// before\npeer node resume\n// after\npeer node resume -c mychannel","handlingStrategy":"validation","validationCode":"if [ -z \"$CHANNEL\" ]; then echo \"usage: peer node resume -c <channelID>\" >&2; exit 1; fi\npeer node resume -c \"$CHANNEL\"","typeGuard":null,"tryCatchPattern":"if err := runResume(); err != nil && err.Error() == \"Must supply channel ID\" {\n    return fmt.Errorf(\"usage: peer node resume -c <channelID>\")\n}","preventionTips":["Supply -c/--channelID on every invocation.","Validate channel name non-empty in maintenance scripts.","Run pause/resume pairs with identical channel variables to avoid mismatches."],"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"}