{"record":{"id":"0dfebd3be16c396b","repo":"grpc/grpc-go","slug":"router-incorrect-config-type-provided-t-v","errorCode":null,"errorMessage":"router: incorrect config type provided (%T): %v","messagePattern":"router: incorrect config type provided \\(%T\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/router/router.go","lineNumber":96,"sourceCode":"\nfunc (builder) BuildClientFilter(httpfilter.ClientFilterOptions) httpfilter.ClientFilter {\n\treturn filter{}\n}\n\nfunc (builder) BuildServerFilter() httpfilter.ServerFilter {\n\treturn filter{}\n}\n\nvar _ httpfilter.ClientFilterBuilder = builder{}\nvar _ httpfilter.ServerFilterBuilder = builder{}\n\ntype filter struct{}\n\nfunc (filter) Close() {}\n\nfunc (filter) BuildClientInterceptor(cfg, override httpfilter.FilterConfig) (httpfilter.ClientInterceptor, error) {\n\tif _, ok := cfg.(config); !ok {\n\t\treturn nil, fmt.Errorf(\"router: incorrect config type provided (%T): %v\", cfg, cfg)\n\t}\n\tif override != nil {\n\t\treturn nil, fmt.Errorf(\"router: unexpected override configuration specified: %v\", override)\n\t}\n\t// The gRPC router is implemented within the xds resolver's config\n\t// selector, not as a separate plugin.  So we return a nil HTTPFilter,\n\t// which will not be invoked.\n\treturn nil, nil\n}\n\nfunc (filter) BuildServerInterceptor(cfg, override httpfilter.FilterConfig) (iresolver.ServerInterceptor, error) {\n\tif _, ok := cfg.(config); !ok {\n\t\treturn nil, fmt.Errorf(\"router: incorrect config type provided (%T): %v\", cfg, cfg)\n\t}\n\tif override != nil {\n\t\treturn nil, fmt.Errorf(\"router: unexpected override configuration specified: %v\", override)\n\t}\n\t// The gRPC router is currently unimplemented on the server side. So we","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/router/router.go#L78-L114","documentation":"BuildClientInterceptor asserts the listener-level config is the router builder's own config struct. A different type means a config produced by another filter builder was dispatched into the router builder.","triggerScenarios":"The httpfilter registry hands a non-router config to the router's BuildClientInterceptor - e.g. a TypeURL collision or misrouted filter chain.","commonSituations":"Filter misregistration; TypeURL collision between custom and built-in filters; internal dispatch bug.","solutions":["Confirm no two registered httpfilter builders advertise the router TypeURL.","Ensure the builder that produced the config is the router builder."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"// Keep parse and build of the router filter on the same builder instance\n// so the concrete config type matches what BuildClientInterceptor expects.","tryCatchPattern":null,"preventionTips":["Avoid TypeURL collisions between registered builders.","Ensure the builder that parsed the config also builds the interceptor."],"tags":["router","xds","grpc","type-mismatch","internal-wiring"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}