{"record":{"id":"90b5c486a7ac4ab6","repo":"hyperledger/fabric","slug":"s-proposal-response-v","errorCode":null,"errorMessage":"%s - proposal response: %v","messagePattern":"(.+?) - proposal response: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/chaincode/common.go","lineNumber":107,"sourceCode":"\t}\n\n\t// call with empty txid to ensure production code generates a txid.\n\t// otherwise, tests can explicitly set their own txid\n\ttxID := \"\"\n\n\tproposalResp, err := ChaincodeInvokeOrQuery(\n\t\tspec,\n\t\tchannelID,\n\t\ttxID,\n\t\tinvoke,\n\t\tcf.Signer,\n\t\tcf.Certificate,\n\t\tcf.EndorserClients,\n\t\tcf.DeliverClients,\n\t\tcf.BroadcastClient,\n\t)\n\tif err != nil {\n\t\treturn errors.Errorf(\"%s - proposal response: %v\", err, proposalResp)\n\t}\n\n\tif invoke {\n\t\tlogger.Debugf(\"ESCC invoke result: %v\", proposalResp)\n\t\tpRespPayload, err := protoutil.UnmarshalProposalResponsePayload(proposalResp.Payload)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessage(err, \"error while unmarshalling proposal response payload\")\n\t\t}\n\t\tca, err := protoutil.UnmarshalChaincodeAction(pRespPayload.Extension)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessage(err, \"error while unmarshalling chaincode action\")\n\t\t}\n\t\tif proposalResp.Endorsement == nil {\n\t\t\treturn errors.Errorf(\"endorsement failure during invoke. response: %v\", proposalResp.Response)\n\t\t}\n\t\tlogger.Infof(\"Chaincode invoke successful. result: %v\", ca.Response)\n\t} else {\n\t\tif proposalResp == nil {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/chaincode/common.go#L89-L125","documentation":"After invokeOrQuery obtains a proposal response, an error from processing is reported together with the raw proposal response: errors.Errorf(\"%s - proposal response: %v\", err, proposalResp). It surfaces the underlying endorser/processing error alongside the full response payload for diagnosis.","triggerScenarios":"invokeOrQuery returns an error (e.g. failure building/endorsing the proposal, no endorser reachable) while proposalResp is non-nil and is printed for context.","commonSituations":"Endorsers partially failing so a response is returned but processing still errors; TLS/connection issues to the endorser; chaincode rejecting the transaction (response status >= 400 combined with sendFailed paths).","solutions":["Read the wrapped err prefix — it names the root cause (connection, chaincode status, etc.)","Check endorser connectivity/TLS config (--peerAddresses, --tlsRootCertFiles)","Inspect chaincode logs for errors returned in proposalResp.Response.Message","Retry after fixing the failing peer or chaincode logic"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check endorser reachability\npeer channel list --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles certs/peer.pem","typeGuard":null,"tryCatchPattern":"err := invokeOrQuery(...)\nif err != nil {\n  var perr *endorserError\n  if errors.As(err, &perr) { log.Errorf(\"endorser said: %s\", perr.Message) }\n  return fmt.Errorf(\"invoke failed: %w\", err)\n}","preventionTips":["Check chaincode logs first when invokes fail","Ensure --peerAddresses/--tlsRootCertFiles match deployed peers","Confirm the chaincode container is running before invoking","Monitor endorsement policy vs the set of endorsing peers supplied"],"tags":["chaincode","endorsement","fabric"],"backgroundTag":"endorsement-failed","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"}