{"record":{"id":"5cd06aaa7bd2505d","repo":"hyperledger/fabric","slug":"received-nil-proposal-response-5cd06a","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/queryapproved.go","lineNumber":129,"sourceCode":"\t}\n\n\tproposal, err := a.createProposal()\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to create proposal\")\n\t}\n\n\tsignedProposal, err := signProposal(proposal, a.Signer)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to create signed proposal\")\n\t}\n\n\tproposalResponse, err := a.EndorserClient.ProcessProposal(context.Background(), signedProposal)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to endorse proposal\")\n\t}\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.New(\"received proposal response with nil response\")\n\t}\n\n\tif proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {\n\t\treturn errors.Errorf(\"query failed with status: %d - %s\", proposalResponse.Response.Status, proposalResponse.Response.Message)\n\t}\n\n\tif strings.ToLower(a.Input.OutputFormat) == \"json\" {\n\t\treturn a.printResponseAsJSON(proposalResponse)\n\t}\n\treturn a.printResponse(proposalResponse)\n}\n\nfunc (a *ApprovedQuerier) printResponseAsJSON(proposalResponse *pb.ProposalResponse) error {\n\tif a.Input.Name != \"\" {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/queryapproved.go#L111-L147","documentation":"Defensive nil check in QueryApproved (peer lifecycle chaincode queryapproved): ProcessProposal returned a nil response without an error, which is structurally invalid. The command aborts rather than dereferencing nil; the accompanying \"received proposal response with nil response\" covers the partially-nil case.","triggerScenarios":"Thrown at internal/peer/lifecycle/chaincode/queryapproved.go:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check gRPC connectivity and TLS configuration between CLI and peer","Retry the queryapproved command","Inspect peer logs for endorsement errors that produced the malformed reply"],"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"}