grpc/grpc-go · error
fault: error parsing config
Error message
fault: error parsing config %v: %v
What it means
parseConfig (fault.go:90) successfully type-asserted *anypb.Any but UnmarshalTo into fpb.HTTPFault failed. Causes: the Any's type_url does not match HTTPFault, the serialized bytes are corrupt, or the wire schema differs from the linked proto version.
Solutions
- Ensure the anypb.Any type_url is exactly type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault.
- Pin the go-control-plane dependency version to match between server and client.
- Log the wrapped error to identify whether it is a type-URL mismatch or a wire-format decode error.
Example fix
// before
anyCfg := &anypb.Any{TypeUrl: "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFaultLegacy", Value: raw}
// after
anyCfg := &anypb.Any{TypeUrl: "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault", Value: raw} Defensive patterns
Strategy: validation
Validate before calling
if m, ok := cfg.(*anypb.Any); ok {
want := "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault"
if m.TypeUrl != want {
return nil, fmt.Errorf("fault: type_url %q != %q", m.TypeUrl, want)
}
} Try / catch
if err != nil && strings.Contains(err.Error(), "error parsing config") {
// inspect the wrapped error to distinguish type-URL mismatch from wire corruption
} Prevention
- Pin go-control-plane versions across control-plane and data-plane.
- Validate the Any.TypeUrl against builder.TypeURLs() before unmarshalling.
- Add a conformance test that round-trips an HTTPFault through ParseFilterConfig.
When it happens
Trigger: anypb.Any with a mismatched type URL (e.g., a different filter's URL), truncated/malformed payload, or version skew where the server's HTTPFault schema differs from the client's compiled proto.
Common situations: Control-plane and data-plane built from different Envoy proto versions; corrupted config in transit; wrong filter config bound to the fault TypeURL.
Related errors
- extproc: failed to unmarshal config
- extproc: failed to unmarshal override
- fault: error parsing config
- fault: incorrect config type provided (%T)
- fault: incorrect override config type provided (%T)
AI-assisted analysis of grpc/grpc-go@0c51461d27 (2026-08-11).
Data as JSON: /api/errors/877f305d9b5928fc.
Report an issue: GitHub.
Appendix: source
Thrown at internal/xds/httpfilter/fault/fault.go:91
config *fpb.HTTPFault
}
func (builder) TypeURLs() []string {
return []string{"type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault"}
}
// Parsing is the same for the base config and the override config.
func parseConfig(cfg proto.Message) (httpfilter.FilterConfig, error) {
if cfg == nil {
return nil, fmt.Errorf("fault: nil configuration message provided")
}
m, ok := cfg.(*anypb.Any)
if !ok {
return nil, fmt.Errorf("fault: error parsing config %v: unknown type %T", cfg, cfg)
}
msg := new(fpb.HTTPFault)
if err := m.UnmarshalTo(msg); err != nil {
return nil, fmt.Errorf("fault: error parsing config %v: %v", cfg, err)
}
return config{config: msg}, nil
}
func (builder) ParseFilterConfig(cfg proto.Message) (httpfilter.FilterConfig, error) {
return parseConfig(cfg)
}
func (builder) ParseFilterConfigOverride(override proto.Message) (httpfilter.FilterConfig, error) {
return parseConfig(override)
}
func (builder) IsTerminal() bool {
return false
}
func (builder) BuildClientFilter(httpfilter.ClientFilterOptions) httpfilter.ClientFilter {
return clientFilter{}View on GitHub (pinned to 0c51461d27)