{"record":{"id":"76aa63827537417d","repo":"grpc/grpc-go","slug":"extproc-missing-processing-mode-in-config-v","errorCode":null,"errorMessage":"extproc: missing processing_mode in config %v","messagePattern":"extproc: missing processing_mode in config (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/extproc/ext_proc.go","lineNumber":119,"sourceCode":"\t\treturn fmt.Errorf(\"extproc: invalid response body mode %v: want %q or %q\", m, \"NONE\", \"GRPC\")\n\t}\n\tif mode.GetResponseBodyMode() == v3procfilterpb.ProcessingMode_GRPC && mode.GetResponseTrailerMode() != v3procfilterpb.ProcessingMode_SEND {\n\t\treturn fmt.Errorf(\"extproc: invalid response trailer mode %v: must be %q when response body mode is %q\", mode.GetResponseTrailerMode(), \"SEND\", \"GRPC\")\n\t}\n\treturn nil\n}\n\nfunc (builder) ParseFilterConfig(cfg proto.Message) (httpfilter.FilterConfig, error) {\n\tm, ok := cfg.(*anypb.Any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"extproc: error parsing config %v: unknown type %T, want *anypb.Any\", cfg, cfg)\n\t}\n\tmsg := new(v3procfilterpb.ExternalProcessor)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to unmarshal config %v: %v\", cfg, err)\n\t}\n\tif msg.GetProcessingMode() == nil {\n\t\treturn nil, fmt.Errorf(\"extproc: missing processing_mode in config %v\", cfg)\n\t}\n\tif err := validateBodyProcessingMode(msg.GetProcessingMode()); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif msg.GetGrpcService() == nil {\n\t\treturn nil, fmt.Errorf(\"extproc: empty grpc_service provided in config %v\", cfg)\n\t}\n\tserver, err := iextproc.ParseGRPCServiceConfig(msg.GetGrpcService())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to parse grpc_service %v\", err)\n\t}\n\n\tmutationRules, err := httpfilter.HeaderMutationRulesFromProto(msg.GetMutationRules())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/grpc/grpc-go/blob/0c51461d27177d997e14c642fe18c11668fc09a3/internal/xds/httpfilter/extproc/ext_proc.go#L101-L137","documentation":"Returned by ParseFilterConfig when the decoded ExternalProcessor message has a nil processing_mode field. processing_mode is required because it defines which parts of the request/response are sent to the external processor; without it the filter cannot operate. Hit at ext_proc.go:118.","triggerScenarios":"An xDS ExternalProcessor resource is sent with no processing_mode populated (the field is optional in proto3). ParseFilterConfig detects msg.GetProcessingMode() == nil and rejects the config.","commonSituations":"A minimal config template omitted processing_mode assuming a default; a control-plane upgrade reset optional fields; the resource was hand-authored and missed the field.","solutions":["Populate processing_mode in the ExternalProcessor config with explicit request/response modes.","If the control plane has a defaulting layer, ensure it sets processing_mode before emitting.","Validate the resource with protoc/grpcurl-xds before applying.","Cross-check the field against the proto definition your control plane compiles."],"exampleFix":"# before\n# ExternalProcessor with no processing_mode\n# after\nprocessing_mode:\n  request_header_mode: SEND\n  response_header_mode: SEND\n  request_body_mode: NONE\n  response_body_mode: NONE\n  response_trailer_mode: SKIP","handlingStrategy":"validation","validationCode":"// control-plane guard\nif cfg.GetProcessingMode() == nil {\n  return fmt.Errorf(\"ext_proc config requires processing_mode\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always populate processing_mode in the ExternalProcessor config.","Add control-plane schema validation for the required field.","Validate resources with protoc before applying.","Diff new configs against a known-good baseline."],"tags":["grpc","xds","extproc","config","required-field"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}