{"record":{"id":"0e6753805331ff9f","repo":"grpc/grpc-java","slug":"e-getmessage","errorCode":null,"errorMessage":"${e.getMessage()}","messagePattern":"\\$\\{e\\.getMessage\\(\\)\\}","errorType":"validation","errorClass":"ExtAuthzParseException","httpStatus":null,"severity":"error","filePath":"xds/src/main/java/io/grpc/xds/ExtAuthzConfigParser.java","lineNumber":73,"sourceCode":"    GrpcServiceConfig grpcServiceConfig;\n    try {\n      grpcServiceConfig =\n          GrpcServiceConfigParser.parse(extAuthzProto.getGrpcService(), bootstrapInfo, serverInfo);\n    } catch (GrpcServiceParseException e) {\n      throw new ExtAuthzParseException(\"Failed to parse GrpcService config: \" + e.getMessage(), e);\n    }\n    ExtAuthzConfig.Builder builder = ExtAuthzConfig.builder().grpcService(grpcServiceConfig)\n        .failureModeAllow(extAuthzProto.getFailureModeAllow())\n        .failureModeAllowHeaderAdd(extAuthzProto.getFailureModeAllowHeaderAdd())\n        .includePeerCertificate(extAuthzProto.getIncludePeerCertificate())\n        .denyAtDisable(extAuthzProto.getDenyAtDisable().getDefaultValue().getValue());\n\n    if (extAuthzProto.hasFilterEnabled()) {\n      try {\n        builder.filterEnabled(\n            MatcherParser.parseFractionMatcher(extAuthzProto.getFilterEnabled().getDefaultValue()));\n      } catch (IllegalArgumentException e) {\n        throw new ExtAuthzParseException(e.getMessage());\n      }\n    }\n\n    if (extAuthzProto.hasStatusOnError()) {\n      builder.statusOnError(\n          GrpcUtil.httpStatusToGrpcStatus(extAuthzProto.getStatusOnError().getCodeValue()));\n    }\n\n    if (extAuthzProto.hasAllowedHeaders()) {\n      builder.allowedHeaders(extAuthzProto.getAllowedHeaders().getPatternsList().stream()\n          .map(MatcherParser::parseStringMatcher).collect(ImmutableList.toImmutableList()));\n    }\n\n    if (extAuthzProto.hasDisallowedHeaders()) {\n      builder.disallowedHeaders(extAuthzProto.getDisallowedHeaders().getPatternsList().stream()\n          .map(MatcherParser::parseStringMatcher).collect(ImmutableList.toImmutableList()));\n    }\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/grpc/grpc-java/blob/64daddc1f3d1975670f769f3e97bde8b2ba32d25/xds/src/main/java/io/grpc/xds/ExtAuthzConfigParser.java#L55-L91","documentation":"When the ext_authz proto has a filter_enabled RuntimeFractionalPercent, ExtAuthzConfigParser parses it with MatcherParser.parseFractionMatcher; an IllegalArgumentException (invalid numerator/denominator or unsupported percentage format) is rethrown as ExtAuthzParseException with the original message. It indicates the fractional-percent matcher in the filter config is numerically invalid.","triggerScenarios":"LDS config where ext_authz.filter_enabled.defaultValue contains a FractionalPercent with an out-of-range numerator or a denominator the parser can't handle; parse() calls MatcherParser.parseFractionMatcher which throws IllegalArgumentException.","commonSituations":"Control plane sends filter_enabled with e.g. numerator 200 and denominator HUNDRED, or an unset/invalid default value; hand-edited Envoy filter configs; version mismatches where newer percentage semantics aren't supported by the client.","solutions":["Read e.getMessage() to see which value was rejected and correct the filter_enabled FractionalPercent in the LDS config.","Ensure numerator is 0..denominator (0-100 for HUNDRED, 0-10000 for TEN_THOUSAND, 0-1000000 for MILLION).","If you don't need percentage rollout, remove filter_enabled entirely so the filter applies to all requests.","Upgrade grpc-java xDS if the control plane emits newer FractionalPercent variants."],"exampleFix":"// before\n\"filterEnabled\": { \"defaultValue\": { \"numerator\": 150, \"denominator\": \"HUNDRED\" } }\n// after\n\"filterEnabled\": { \"defaultValue\": { \"numerator\": 100, \"denominator\": \"HUNDRED\" } }","handlingStrategy":"validation","validationCode":"static void checkFractionalPercent(int numerator, String denominator) {\n  int max = switch (denominator) { case \"HUNDRED\" -> 100; case \"TEN_THOUSAND\" -> 10000; case \"MILLION\" -> 1000000; default -> -1; };\n  if (max < 0 || numerator < 0 || numerator > max) throw new IllegalArgumentException(\"bad fraction\");\n}","typeGuard":null,"tryCatchPattern":"try { /* start xDS */ } catch (ExtAuthzParseException e) { log.error(\"filter_enabled invalid: {}\", e.getMessage()); }","preventionTips":["Keep FractionalPercent numerator within [0, denominator]","Prefer denominator HUNDRED unless you need finer granularity","Test filter configs against a local control plane before production rollout"],"tags":["xds","config-parsing","ext-authz","fractional-percent"],"backgroundTag":"invalid-argument-value","analyzedSha":"64daddc1f3d1975670f769f3e97bde8b2ba32d25","analyzedAt":"2026-09-08T06:14:57.704Z","contentChangedAt":"2026-09-08T06:14:57.704Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}