{"record":{"id":"c01557f5261f0f76","repo":"hyperledger/fabric","slug":"error-bad-proposal-response-d-s","errorCode":null,"errorMessage":"error bad proposal response %d: %s","messagePattern":"error bad proposal response (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/common/common.go","lineNumber":266,"sourceCode":"\t\treturn nil, errors.WithMessage(err, \"error creating GetChannelConfig proposal\")\n\t}\n\n\tsignedProp, err := protoutil.GetSignedProposal(prop, signer)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error creating signed GetChannelConfig proposal\")\n\t}\n\n\tproposalResp, err := endorserClient.ProcessProposal(context.Background(), signedProp)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error endorsing GetChannelConfig\")\n\t}\n\n\tif proposalResp == nil {\n\t\treturn nil, errors.New(\"received nil proposal response\")\n\t}\n\n\tif proposalResp.Response.Status != 0 && proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"error bad proposal response %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\t// parse config\n\tchannelConfig := &pcommon.Config{}\n\tif err := proto.Unmarshal(proposalResp.Response.Payload, channelConfig); err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error unmarshalling channel config\")\n\t}\n\n\tbundle, err := channelconfig.NewBundle(chainID, channelConfig, cryptoProvider)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error loading channel config\")\n\t}\n\n\tordererConfig, ok := bundle.OrdererConfig()\n\tif !ok {\n\t\treturn nil, errors.New(\"missing OrdererConfig in channel config\")\n\t}\n","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/common/common.go#L248-L284","documentation":"The endorser did return a proposal response, but its embedded response status is neither 0 (unset) nor 200 OK. The error surfaces the peer's status code and message so the caller can see why the endorsement (GetChannelConfig) was rejected.","triggerScenarios":"endorserClient.ProcessProposal succeeds but proposalResp.Response.Status is a non-200 code, e.g. 500 (chained execution failure), 403/404 (access or unknown channel), 400 (bad proposal).","commonSituations":"Querying a channel the peer is not joined to (unknown channel), permission/ACL rejection for the requesting identity, chaincode/endorser internal error while loading channel config.","solutions":["Read the %s message and %d status embedded in the error to identify the peer-side cause","Verify the peer has joined the target channel (peer channel list)","Check the client MSP identity has read access to channel config resources","Retry with a different peer joined to the channel"],"exampleFix":"// before\nresp, _ := common.GetOrdererEndpointOfChain(\"mychannel\", nil, signer, certPool)\n// after\nresp, err := common.GetOrdererEndpointOfChain(\"mychannel\", nil, signer, certPool)\nif err != nil { log.Fatalf(\"endorsement rejected: %v\", err) }","handlingStrategy":"try-catch","validationCode":"// verify peer has joined the channel before querying config\n// peer channel list | grep <channelID>\n// ensure the signer's MSP is enrolled and known to the peer","typeGuard":"if resp != nil && resp.Response != nil && (resp.Response.Status == 0 || resp.Response.Status == 200) {\n    // response is usable\n}","tryCatchPattern":"orderers, err := GetOrdererEndpointOfChain(chainID, dc, signer, cp)\nif err != nil {\n    var statusErr interface{ Status() int32 }\n    log.Printf(\"endorsement rejected: %v\", err) // status+message are embedded in the text\n    return err\n}","preventionTips":["Confirm the peer has joined the target channel before querying","Check ACL/policy grants for the client identity","Read the embedded status code and message to triage quickly"],"tags":["fabric","endorser","proposal-status","endorsement-failed"],"backgroundTag":"proposal-endorsement-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"}