{"record":{"id":"6a78b69dbb45237b","repo":"hyperledger/fabric","slug":"errors-new-err-content","errorCode":null,"errorMessage":"errors.New(err.Content)","messagePattern":"errors\\.New\\(err\\.Content\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"discovery/client/client.go","lineNumber":376,"sourceCode":"\t\t}\n\t}\n\n\treturn resp, err\n}\n\nfunc (resp response) mapConfig(channel2index map[string]int, r *discovery.Response) error {\n\tfor ch, index := range channel2index {\n\t\tconfig, err := protoext.ResponseConfigAt(r, index)\n\t\tif config == nil && err == nil {\n\t\t\treturn errors.Errorf(\"expected QueryResult of either ConfigResult or Error but got %v instead\", r.Results[index])\n\t\t}\n\t\tkey := key{\n\t\t\tqueryType: protoext.ConfigQueryType,\n\t\t\tk:         ch,\n\t\t}\n\n\t\tif err != nil {\n\t\t\tresp[key] = errors.New(err.Content)\n\t\t\tcontinue\n\t\t}\n\n\t\tresp[key] = config\n\t}\n\treturn nil\n}\n\nfunc (resp response) mapPeerMembership(key2Index map[string]int, r *discovery.Response, qt protoext.QueryType) error {\n\tfor k, index := range key2Index {\n\t\tmembersRes, err := protoext.ResponseMembershipAt(r, index)\n\t\tif membersRes == nil && err == nil {\n\t\t\treturn errors.Errorf(\"expected QueryResult of either PeerMembershipResult or Error but got %v instead\", r.Results[index])\n\t\t}\n\n\t\tkey := key{\n\t\t\tqueryType: qt,\n\t\t\tk:         k,","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/discovery/client/client.go#L358-L394","documentation":"mapConfig received a non-nil Error payload from the discovery service for a channel's config query; the error's Content string is surfaced as the error value for that channel's config entry in the response map.","triggerScenarios":"Thrown at discovery/client/client.go:376 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying discovery service error (e.g. channel not found, access denied)","Retry the discovery request after fixing the server-side cause"],"exampleFix":null,"handlingStrategy":"retry","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"}