grpc/grpc-go · error

extproc: error parsing override

Error message

extproc: error parsing override %v: unknown type %T, want *anypb.Any

What it means

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.

Solutions

  1. Wrap the override in *anypb.New(extProcPerRouteMsg) before calling ParseFilterConfigOverride.
  2. Re-check the httpfilter.Builder contract for override parsing (expects *anypb.Any).
  3. Reproduce with the stock resolver; if it works, fix your integration.
  4. Report to grpc-go if it reproduces on unmodified code.

Example fix

// before (internal caller)
ov, err := b.ParseFilterConfigOverride(perRouteMsg)
// after
anyOv, _ := anypb.New(perRouteMsg)
ov, err := b.ParseFilterConfigOverride(anyOv)
Defensive patterns

Strategy: type-guard

Type guard

// internal caller: ensure override is *anypb.Any
func isAnyOverride(m proto.Message) bool {
  _, ok := m.(*anypb.Any)
  return ok
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of grpc/grpc-go@0c51461d27 (2026-08-11). Data as JSON: /api/errors/5d3938a54bea0115. Report an issue: GitHub.

Appendix: source

Thrown at internal/xds/httpfilter/extproc/ext_proc.go:176

	return baseConfig{
		processingModes:          processingModesFromProto(msg.GetProcessingMode()),
		requestAttributes:        msg.GetRequestAttributes(),
		responseAttributes:       msg.GetResponseAttributes(),
		disableImmediateResponse: msg.GetDisableImmediateResponse(),
		observabilityMode:        msg.GetObservabilityMode(),
		failureModeAllow:         msg.GetFailureModeAllow(),
		server:                   server,
		mutationRules:            mutationRules,
		allowedHeaders:           allowedHeaders,
		disallowedHeaders:        disallowedHeaders,
		deferredCloseTimeout:     deferredCloseTimeout,
	}, nil
}

func (builder) ParseFilterConfigOverride(ov proto.Message) (httpfilter.FilterConfig, error) {
	m, ok := ov.(*anypb.Any)
	if !ok {
		return nil, fmt.Errorf("extproc: error parsing override %v: unknown type %T, want *anypb.Any", ov, ov)
	}
	msg := new(v3procfilterpb.ExtProcPerRoute)
	if err := m.UnmarshalTo(msg); err != nil {
		return nil, fmt.Errorf("extproc: failed to unmarshal override %v: %v", ov, err)
	}
	override := msg.GetOverrides()

	var processingModesOpt optional.Optional[processingModes]
	if pm := override.GetProcessingMode(); pm != nil {
		if err := validateBodyProcessingMode(pm); err != nil {
			return nil, err
		}
		processingModesOpt = optional.New(processingModesFromProto(pm))
	}

	var serverOpt optional.Optional[xdsresource.GRPCServiceConfig]
	if override.GetGrpcService() != nil {
		server, err := iextproc.ParseGRPCServiceConfig(override.GetGrpcService())

View on GitHub (pinned to 0c51461d27)