{"record":{"id":"e9f9ace883ed5390","repo":"apache/dolphinscheduler","slug":"grpc-unrecogenized-condition-s","errorCode":null,"errorMessage":"grpc unrecogenized condition %s","messagePattern":"grpc unrecogenized condition (.+?)","errorType":"exception","errorClass":"GrpcTaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-grpc/src/main/java/org/apache/dolphinscheduler/plugin/task/grpc/GrpcTask.java","lineNumber":129,"sourceCode":"                    exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;\n                    return;\n                }\n                break;\n            case STATUS_CODE_CUSTOM:\n                try {\n                    Status.Code codeEnum = Status.Code.valueOf(grpcParameters.getCondition());\n                    Status expectedCode = Status.fromCode(codeEnum);\n                    if (statusCode != expectedCode) {\n                        log.error(\n                                \"grpc request failed, url: {}, method: {}, statusCode: {} (expect {}), checkCondition: {}\",\n                                grpcParameters.getUrl(), grpcParameters.getMethodName(), statusCode.getCode(),\n                                expectedCode,\n                                GrpcCheckCondition.STATUS_CODE_DEFAULT.name());\n                        exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;\n                        return;\n                    }\n                } catch (IllegalArgumentException e) {\n                    throw new GrpcTaskException(\n                            String.format(\"grpc unrecogenized condition %s\", grpcParameters.getCondition()));\n                }\n                break;\n            default:\n                throw new GrpcTaskException(String.format(\"grpc check condition %s not supported\",\n                        grpcParameters.getGrpcCheckCondition()));\n        }\n        // default success log\n        log.info(\"grpc request success, url: {}, method: {}, statusCode: {}\", grpcParameters.getUrl(),\n                grpcParameters.getMethodName(), statusCode.getCode());\n        exitStatusCode = TaskConstants.EXIT_CODE_SUCCESS;\n    }\n\n    @Override\n    public AbstractParameters getParameters() {\n        return this.grpcParameters;\n    }\n","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-grpc/src/main/java/org/apache/dolphinscheduler/plugin/task/grpc/GrpcTask.java#L111-L147","documentation":"GrpcTask.validateResponse() evaluates the configured condition (grpcParameters.getCondition()) against the response status code. If parsing the condition throws IllegalArgumentException (unknown condition string), it throws GrpcTaskException('grpc unrecogenized condition %s'). The condition string is not one the checker recognizes.","triggerScenarios":"grpcParameters.getCondition() contains an unrecognized operator/string (e.g. 'equals' vs '=', typo, or empty/whitespace) passed to an enum.valueOf-style parse that throws IllegalArgumentException.","commonSituations":"Hand-typing the condition in the UI; condition values from older task definitions no longer supported; copy-paste with extra spaces or wrong casing.","solutions":["Set condition to one of the supported values (e.g. EQ, NEQ as defined by GrpcTask's condition handling)","Trim whitespace and fix casing of the condition in the task form","Re-save the task definition and re-run","If upgrading, migrate old condition values to the current accepted set"],"exampleFix":"// before\n{\"condition\":\"==\"}\n// after\n{\"condition\":\"EQ\"}","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"EQ\",\"NEQ\",\"GT\",\"LT\",\"GE\",\"LE\"); // match GrpcTask's supported set\nif (!allowed.contains(condition == null ? \"\" : condition.trim())) {\n    throw new IllegalArgumentException(\"unsupported condition: \" + condition);\n}","typeGuard":null,"tryCatchPattern":"try {\n    task.handle(null);\n} catch (GrpcTaskException e) {\n    if (e.getMessage().startsWith(\"grpc unrecogenized condition\")) {\n        // fix condition value in the task definition and re-run\n    }\n    throw e;\n}","preventionTips":["Choose condition values only from the UI dropdown (no free text)","Trim whitespace from condition strings","Migrate old condition spellings after upgrades","Add unit tests covering every supported condition string"],"tags":["grpc","condition","invalid-enum","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}