{"record":{"id":"7a16eb5c4fa7952c","repo":"alibaba/nacos","slug":"20011","errorCode":"20011","errorMessage":"config gray rule format invalid","messagePattern":"config gray rule format invalid","errorType":"http","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java","lineNumber":208,"sourceCode":"        ConfigRequestInfo configRequestInfo)\n        throws NacosException {\n        configForm\n            .setNamespaceId(NamespaceUtil.processNamespaceParameter(configForm.getNamespaceId()));\n        \n        Map<String, Object> configAdvanceInfo = getConfigAdvanceInfo(configForm);\n        ParamUtils.checkParam(configAdvanceInfo);\n        \n        ConfigGrayPersistInfo localConfigGrayPersistInfo = new ConfigGrayPersistInfo(grayType,\n            configForm.getGrayVersion(), configForm.getGrayRuleExp(), configForm.getGrayPriority());\n        GrayRule grayRuleStruct = GrayRuleManager.constructGrayRule(localConfigGrayPersistInfo);\n        if (grayRuleStruct == null) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.CONFIG_GRAY_VERSION_INVALID,\n                ErrorCode.CONFIG_GRAY_VERSION_INVALID.getMsg());\n        }\n        \n        if (!grayRuleStruct.isValid()) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.CONFIG_GRAY_RULE_FORMAT_INVALID,\n                ErrorCode.CONFIG_GRAY_RULE_FORMAT_INVALID.getMsg());\n        }\n        \n        //version count check.\n        if (checkGrayVersionOverMaxCount(configForm.getDataId(), configForm.getGroup(),\n            configForm.getNamespaceId(),\n            configForm.getGrayName())) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.CONFIG_GRAY_OVER_MAX_VERSION_COUNT,\n                \"gray config version is over max count :\" + getMaxGrayVersionCount());\n        }\n        \n        ConfigInfo configInfo = new ConfigInfo(configForm.getDataId(), configForm.getGroup(),\n            configForm.getNamespaceId(), configForm.getAppName(), configForm.getContent());\n        // set old md5\n        if (StringUtils.isNotBlank(configRequestInfo.getCasMd5())) {\n            configInfo.setMd5(configRequestInfo.getCasMd5());","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java#L190-L226","documentation":"Error \"config gray rule format invalid\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at config/src/main/java/com/alibaba/nacos/config/server/service/ConfigOperationService.java:208 when the library encounters an invalid state.","commonSituations":"Publishing a gray rule whose expression fails format validation.","solutions":["Correct the invalid value for gray rule format to match the expected format or allowed set, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}