{"record":{"id":"72f58a6190cacdb2","repo":"grpc/grpc-go","slug":"router-unexpected-override-configuration-specifie","errorCode":null,"errorMessage":"router: unexpected override configuration specified: %v","messagePattern":"router: unexpected override configuration specified: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/router/router.go","lineNumber":99,"sourceCode":"}\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\n\t// return a nil HTTPFilter, which will not be invoked.\n\treturn nil, nil\n}","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/router/router.go#L81-L117","documentation":"BuildClientInterceptor also rejects overrides: the router filter does not accept a per-route override at interceptor-build time (mirroring ParseFilterConfigOverride). Passing a non-nil override is an error.","triggerScenarios":"BuildClientInterceptor is invoked with a non-nil override for the router filter.","commonSituations":"Internal wiring that forwards overrides to all filters uniformly; a per-route config that should have been filtered out for the router.","solutions":["Do not pass an override for the router filter when constructing its interceptor.","Ensure the resolver's config selector drops router overrides (they are rejected at parse time too)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// In custom resolver wiring, never forward an override to the router filter.\nfunc dropRouterOverride(name string, override httpfilter.FilterConfig) httpfilter.FilterConfig {\n\tif name == \"envoy.filters.http.router\" {\n\t\treturn nil\n\t}\n\treturn override\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Filter out overrides for the router filter in the config selector.","Reject router overrides at parse time (ParseFilterConfigOverride already does)."],"tags":["router","xds","grpc","per-route","internal-wiring"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}