grpc/grpc-go · error
fault: nil configuration message provided
Error message
fault: nil configuration message provided
What it means
parseConfig (fault.go:82) rejects a nil proto.Message up front. The fault filter requires an *anypb.Any wrapping an HTTPFault proto; a nil cfg means the xDS layer handed nothing to the parser, which is always a programming or control-plane error.
Solutions
- Provide a non-nil *anypb.Any wrapping a populated fpb.HTTPFault proto to ParseFilterConfig.
- Inspect the xDS Listener resource to confirm the fault filter's typed_config is present and has the correct type URL.
- If fault injection is not desired, remove the filter from the Listener rather than sending nil.
Example fix
// before
fc, err := faultBuilder.ParseFilterConfig(nil)
// after
anyCfg, _ := anypb.New(&fpb.HTTPFault{Abort: &cpb.FaultAbort{...}})
fc, err := faultBuilder.ParseFilterConfig(anyCfg) Defensive patterns
Strategy: validation
Validate before calling
if cfg == nil {
return nil, errors.New("fault: refusing to parse nil config")
} Try / catch
fc, err := faultBuilder.ParseFilterConfig(anyCfg)
if err != nil {
if strings.Contains(err.Error(), "nil configuration message") {
// control-plane sent an empty fault filter entry; remove it or populate it
}
return err
} Prevention
- Always populate the fault filter's typed_config in the xDS Listener.
- Reject nil configs at the control-plane before they reach the data-plane.
- Unit-test programmatic registration paths with non-nil inputs.
When it happens
Trigger: ParseFilterConfig(nil) or ParseFilterConfigOverride(nil) is invoked, either directly or because the xDS resource contained a nil-typed config proto for the fault filter.
Common situations: xDS server emits a fault filter entry with an empty/absent config; programmatic registration of the filter with nil; test code that forgot to populate the config.
Related errors
- fault: error parsing config
- fault: error parsing config
- fault: incorrect config type provided (%T)
- fault: incorrect override config type provided (%T)
- fault: nil config provided
AI-assisted analysis of grpc/grpc-go@0c51461d27 (2026-08-11).
Data as JSON: /api/errors/092a0d60418031ae.
Report an issue: GitHub.
Appendix: source
Thrown at internal/xds/httpfilter/fault/fault.go:83
httpfilter.Register(builder{})
}
type builder struct {
}
type config struct {
httpfilter.FilterConfig
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)View on GitHub (pinned to 0c51461d27)