hyperledger/fabric · error

errors.New(err.Content)

Error message

errors.New(err.Content)

What it means

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.

Solutions

  1. Inspect the underlying discovery service error (e.g. channel not found, access denied)
  2. Retry the discovery request after fixing the server-side cause
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at discovery/client/client.go:376 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/6a78b69dbb45237b. Report an issue: GitHub.

Appendix: source

Thrown at discovery/client/client.go:376

		}
	}

	return resp, err
}

func (resp response) mapConfig(channel2index map[string]int, r *discovery.Response) error {
	for ch, index := range channel2index {
		config, err := protoext.ResponseConfigAt(r, index)
		if config == nil && err == nil {
			return errors.Errorf("expected QueryResult of either ConfigResult or Error but got %v instead", r.Results[index])
		}
		key := key{
			queryType: protoext.ConfigQueryType,
			k:         ch,
		}

		if err != nil {
			resp[key] = errors.New(err.Content)
			continue
		}

		resp[key] = config
	}
	return nil
}

func (resp response) mapPeerMembership(key2Index map[string]int, r *discovery.Response, qt protoext.QueryType) error {
	for k, index := range key2Index {
		membersRes, err := protoext.ResponseMembershipAt(r, index)
		if membersRes == nil && err == nil {
			return errors.Errorf("expected QueryResult of either PeerMembershipResult or Error but got %v instead", r.Results[index])
		}

		key := key{
			queryType: qt,
			k:         k,

View on GitHub (pinned to 2736b63f8f)