{"record":{"id":"5d3938a54bea0115","repo":"grpc/grpc-go","slug":"extproc-error-parsing-override-v-unknown-type","errorCode":null,"errorMessage":"extproc: error parsing override %v: unknown type %T, want *anypb.Any","messagePattern":"extproc: error parsing override (.+?): unknown type %T, want \\*anypb\\.Any","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/extproc/ext_proc.go","lineNumber":176,"sourceCode":"\treturn baseConfig{\n\t\tprocessingModes:          processingModesFromProto(msg.GetProcessingMode()),\n\t\trequestAttributes:        msg.GetRequestAttributes(),\n\t\tresponseAttributes:       msg.GetResponseAttributes(),\n\t\tdisableImmediateResponse: msg.GetDisableImmediateResponse(),\n\t\tobservabilityMode:        msg.GetObservabilityMode(),\n\t\tfailureModeAllow:         msg.GetFailureModeAllow(),\n\t\tserver:                   server,\n\t\tmutationRules:            mutationRules,\n\t\tallowedHeaders:           allowedHeaders,\n\t\tdisallowedHeaders:        disallowedHeaders,\n\t\tdeferredCloseTimeout:     deferredCloseTimeout,\n\t}, nil\n}\n\nfunc (builder) ParseFilterConfigOverride(ov proto.Message) (httpfilter.FilterConfig, error) {\n\tm, ok := ov.(*anypb.Any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"extproc: error parsing override %v: unknown type %T, want *anypb.Any\", ov, ov)\n\t}\n\tmsg := new(v3procfilterpb.ExtProcPerRoute)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to unmarshal override %v: %v\", ov, err)\n\t}\n\toverride := msg.GetOverrides()\n\n\tvar processingModesOpt optional.Optional[processingModes]\n\tif pm := override.GetProcessingMode(); pm != nil {\n\t\tif err := validateBodyProcessingMode(pm); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tprocessingModesOpt = optional.New(processingModesFromProto(pm))\n\t}\n\n\tvar serverOpt optional.Optional[xdsresource.GRPCServiceConfig]\n\tif override.GetGrpcService() != nil {\n\t\tserver, err := iextproc.ParseGRPCServiceConfig(override.GetGrpcService())","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/grpc/grpc-go/blob/0c51461d27177d997e14c642fe18c11668fc09a3/internal/xds/httpfilter/extproc/ext_proc.go#L158-L194","documentation":"Returned by ParseFilterConfigOverride when the proto.Message passed in is not *anypb.Any. This is the per-route override counterpart of error 454: the xDS resolver should deliver ExtProcPerRoute overrides as packed Any messages; another type indicates an internal registry/wiring bug. Hit at ext_proc.go:175.","triggerScenarios":"An internal caller invokes builder.ParseFilterConfigOverride with a concrete *v3procfilterpb.ExtProcPerRoute (or other non-Any type) instead of *anypb.Any. End users essentially never trigger this directly.","commonSituations":"A fork of grpc-go changes how typed_per_filter_config is dispatched; a test passes the unwrapped proto; an out-of-tree integration calls the builder API incorrectly.","solutions":["Wrap the override in *anypb.New(extProcPerRouteMsg) before calling ParseFilterConfigOverride.","Re-check the httpfilter.Builder contract for override parsing (expects *anypb.Any).","Reproduce with the stock resolver; if it works, fix your integration.","Report to grpc-go if it reproduces on unmodified code."],"exampleFix":"// before (internal caller)\nov, err := b.ParseFilterConfigOverride(perRouteMsg)\n// after\nanyOv, _ := anypb.New(perRouteMsg)\nov, err := b.ParseFilterConfigOverride(anyOv)","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"// internal caller: ensure override is *anypb.Any\nfunc isAnyOverride(m proto.Message) bool {\n  _, ok := m.(*anypb.Any)\n  return ok\n}","tryCatchPattern":null,"preventionTips":["Wrap overrides in anypb.New before ParseFilterConfigOverride.","Follow the httpfilter.Builder override contract (input is *anypb.Any).","File a grpc-go issue if this reproduces unmodified.","Audit forks that change typed_per_filter_config dispatch."],"tags":["grpc","xds","extproc","internal","config"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}