{"record":{"id":"b168610db8885b91","repo":"hyperledger/fabric","slug":"received-bad-response-status-d-s","errorCode":null,"errorMessage":"received bad response, status %d: %s","messagePattern":"received bad response, status (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/channel/getinfo.go","lineNumber":72,"sourceCode":"\tc, _ := cc.cf.Signer.Serialize()\n\tprop, _, err = protoutil.CreateProposalFromCIS(cb.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"cannot create proposal\")\n\t}\n\n\tvar signedProp *pb.SignedProposal\n\tsignedProp, err = protoutil.GetSignedProposal(prop, cc.cf.Signer)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"cannot create signed proposal\")\n\t}\n\n\tproposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"failed sending proposal\")\n\t}\n\n\tif proposalResp.Response == nil || proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"received bad response, status %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\tblockChainInfo := &cb.BlockchainInfo{}\n\terr = proto.Unmarshal(proposalResp.Response.Payload, blockChainInfo)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"cannot read qscc response\")\n\t}\n\n\treturn blockChainInfo, nil\n}\n\nfunc getinfo(cmd *cobra.Command, cf *ChannelCmdFactory) error {\n\t// the global chainID filled by the \"-c\" command\n\tif channelID == common.UndefinedParamValue {\n\t\treturn errors.New(\"Must supply channel ID\")\n\t}\n\t// Parsing of the command line is done so silence cmd usage\n\tcmd.SilenceUsage = true","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/getinfo.go#L54-L90","documentation":"This error is returned by getBlockChainInfo in the peer channel getinfo command when the qscc (Query System Chaincode) proposal sent to the endorser comes back with a non-200 response status (or with no Response at all). The endorser processed the proposal but rejected or failed it, so the message embeds the peer-provided status code and message. It means the channel query itself failed at the peer, not the network transport.","triggerScenarios":"Running `peer channel getinfo` when the peer rejects the proposal: the channel does not exist on the peer, the client identity is not authorized on the channel, or the qscc GetChainInfo invocation returned an application-level error status (e.g. 500 from chaincode execution).","commonSituations":"Querying a channel the peer has not joined; using an MSP/identity not enrolled in the target channel; a peer that cannot access the ledger for that channel; org membership misconfiguration after network changes.","solutions":["Verify the channel ID with -c and confirm the peer has joined it (`peer channel list`).","Check the peer logs around the request for the underlying qscc error (status 500 usually carries a detail message).","Confirm your signing identity's MSP is a member of the channel and the certificate has not expired.","Retry after fixing peer/ledger issues reported in the peer logs."],"exampleFix":"// before\npeer channel getinfo   # no -c, hits default channel\n// after\npeer channel getinfo -c mychannel","handlingStrategy":"validation","validationCode":"// Verify the peer has joined the channel before getinfo\n// peer channel list   → confirm \"mychannel\" appears\n// Also check identity: peer channel getinfo -c mychannel with correct CORE_PEER_MSPCONFIGPATH","typeGuard":null,"tryCatchPattern":"// shell\nif ! out=$(peer channel getinfo -c \"$CHAN\" 2>&1); then\n  echo \"getinfo failed: $out\"   # inspect status/message from endorser\nfi","preventionTips":["Always pass -c with a channel the peer has joined (verify with peer channel list).","Keep client and peer Fabric versions aligned.","Ensure the invoking identity's MSP belongs to the channel consortium.","Read peer logs for the qscc error behind non-200 statuses."],"tags":["hyperledger-fabric","endorser","cli"],"backgroundTag":"endorser-proposal-rejected","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"}