{"record":{"id":"8b57f0f79150a451","repo":"ipfs/kubo","slug":"failed-to-parse-endpoint-q-w","errorCode":null,"errorMessage":"failed to parse endpoint %q: %w","messagePattern":"failed to parse endpoint %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/libp2p/routingopt.go","lineNumber":122,"sourceCode":"\t}\n\n\treturn endpoints\n}\n\nfunc constructDefaultHTTPRouters(cfg *config.Config, addrFunc func() []ma.Multiaddr) ([]*routinghelpers.ParallelRouter, error) {\n\tvar routers []*routinghelpers.ParallelRouter\n\thttpRetrievalEnabled := cfg.HTTPRetrieval.Enabled.WithDefault(config.DefaultHTTPRetrievalEnabled)\n\n\t// Collect URLs from both router and publisher sources\n\tendpoints := collectAllEndpoints(cfg)\n\n\t// Group endpoints by origin (base URL) and aggregate capabilities\n\toriginCapabilities := make(map[string]autoconf.EndpointCapabilities)\n\tfor _, endpoint := range endpoints {\n\t\t// Parse endpoint and determine capabilities based on source\n\t\tbaseURL, capabilities, err := determineCapabilities(endpoint)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse endpoint %q: %w\", endpoint.URL, err)\n\t\t}\n\n\t\t// Aggregate capabilities for this origin\n\t\texisting := originCapabilities[baseURL]\n\t\texisting.Merge(capabilities)\n\t\toriginCapabilities[baseURL] = existing\n\t}\n\n\t// Create single HTTP router and composer per origin\n\tfor baseURL, capabilities := range originCapabilities {\n\t\t// Construct HTTP router using base URL (without path)\n\t\thttpRouter, err := irouting.ConstructHTTPRouter(baseURL, cfg.Identity.PeerID, addrFunc, cfg.Identity.PrivKey, httpRetrievalEnabled)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Configure router operations based on aggregated capabilities\n\t\t// https://specs.ipfs.tech/routing/http-routing-v1/","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/libp2p/routingopt.go#L104-L140","documentation":"While building the HTTP delegated routers at node startup, one of the configured Routing.DelegatedRouters or Ipns.DelegatedPublishers endpoint URLs could not be parsed as a multiaddr/URL; the offending endpoint string is quoted in the message.","triggerScenarios":"Thrown at core/node/libp2p/routingopt.go:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the endpoint string in Routers.*.Endpoints / Ipns.DelegatedPublishers in the config (e.g. https://example.com/routing/v1)","Check for typos, missing scheme, or stray whitespace","See docs/config.md for the expected endpoint format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}