{"record":{"id":"63bd280a7c5ccbee","repo":"hyperledger/fabric","slug":"received-nil-proposal-response-63bd28","errorCode":null,"errorMessage":"received nil proposal response","messagePattern":"received nil proposal response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/lifecycle/chaincode/approveformyorg.go","lineNumber":194,"sourceCode":"\tfor _, endorser := range a.EndorserClients {\n\t\tproposalResponse, err := endorser.ProcessProposal(context.Background(), signedProposal)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessage(err, \"failed to endorse proposal\")\n\t\t}\n\t\tresponses = append(responses, proposalResponse)\n\t}\n\n\tif len(responses) == 0 {\n\t\t// this should only be empty due to a programming bug\n\t\treturn errors.New(\"no proposal responses received\")\n\t}\n\n\t// all responses will be checked when the signed transaction is created.\n\t// for now, just set this so we check the first response's status\n\tproposalResponse := responses[0]\n\n\tif proposalResponse == nil {\n\t\treturn errors.New(\"received nil proposal response\")\n\t}\n\n\tif proposalResponse.Response == nil {\n\t\treturn errors.Errorf(\"received proposal response with nil response\")\n\t}\n\n\tif proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {\n\t\treturn errors.Errorf(\"proposal failed with status: %d - %s\", proposalResponse.Response.Status, proposalResponse.Response.Message)\n\t}\n\t// assemble a signed transaction (it's an Envelope message)\n\tenv, err := protoutil.CreateSignedTx(proposal, a.Signer, responses...)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to create signed transaction\")\n\t}\n\tvar dg *chaincode.DeliverGroup\n\tvar ctx context.Context\n\tif a.Input.WaitForEvent {\n\t\tvar cancelFunc context.CancelFunc","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/approveformyorg.go#L176-L212","documentation":"Defensive nil check in Approve: the first collected proposal response is nil. ProcessProposal is expected to return an error instead of a nil response, so a nil here indicates a malformed/buggy endorser client result; the approval aborts before building the signed transaction.","triggerScenarios":"Thrown at internal/peer/lifecycle/chaincode/approveformyorg.go:194 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check endorser client configuration and gRPC connectivity to the peer","Retry the command; a transient client failure can yield an unusable response","If reproducible, inspect peer logs for the endorsement failure that produced the empty response"],"exampleFix":null,"handlingStrategy":"type-guard","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"}