{"record":{"id":"28ca1ccb41c3155e","repo":"apache/dolphinscheduler","slug":"10001-28ca1c","errorCode":"10001","errorMessage":"request parameter {0} is not valid","messagePattern":"request parameter (.+?) is not valid","errorType":"validation","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java","lineNumber":387,"sourceCode":"                    log.error(\n                            \"Generate task definition list failed, the given task definition name is duplicate, taskName: {}, taskDefinition: {}\",\n                            taskDefinitionLog.getName(), taskDefinitionLog);\n                    throw new ServiceException(Status.TASK_NAME_DUPLICATE_ERROR, taskDefinitionLog.getName());\n                }\n\n                if (!checkTaskParameters(taskDefinitionLog.getTaskType(), taskDefinitionLog.getTaskParams())) {\n                    log.error(\n                            \"Generate task definition list failed, the given task definition parameter is invalided, taskName: {}, taskDefinition: {}\",\n                            taskDefinitionLog.getName(), taskDefinitionLog);\n                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskDefinitionLog.getName());\n                }\n            }\n            return taskDefinitionLogs;\n        } catch (ServiceException ex) {\n            throw ex;\n        } catch (Exception e) {\n            log.error(\"Generate task definition list failed, meet an unknown exception\", e);\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR);\n        }\n    }\n\n    private List<WorkflowTaskRelationLog> generateTaskRelationList(String taskRelationJson,\n                                                                   List<TaskDefinitionLog> taskDefinitionLogs) {\n        try {\n            List<WorkflowTaskRelationLog> taskRelationList =\n                    JSONUtils.toList(taskRelationJson, WorkflowTaskRelationLog.class);\n            if (CollectionUtils.isEmpty(taskRelationList)) {\n                log.error(\"Generate task relation list failed the taskRelation list is empty, taskRelationJson: {}\",\n                        taskRelationJson);\n                throw new ServiceException(Status.DATA_IS_NOT_VALID);\n            }\n            List<WorkflowTaskRelation> workflowTaskRelations = taskRelationList.stream()\n                    .map(workflowTaskRelationLog -> JSONUtils.parseObject(\n                            JSONUtils.toJsonString(workflowTaskRelationLog),\n                            WorkflowTaskRelation.class))\n                    .collect(Collectors.toList());","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java#L369-L405","documentation":"A catch-all ServiceException thrown from generateTaskDefinitionList when an unexpected (non-ServiceException) exception occurs while parsing or validating the task definition JSON. It maps to the generic REQUEST_PARAMS_NOT_VALID_ERROR status, masking the underlying exception details from the client.","triggerScenarios":"Any runtime exception inside generateTaskDefinitionList not already covered by earlier checks — e.g. a TaskDefinitionLog entry with unexpected internal nulls causing NPE during iteration, or deserialization edge cases.","commonSituations":"JSON entries missing fields the code assumes non-null; upstream library changes altering parse behavior; corrupt payload from intermediate proxies.","solutions":["Check the server log for 'Generate task definition list failed, meet an unknown exception' to see the real stack trace","Validate each entry in taskDefinitionJson has name, taskType, taskParams and taskCode set before calling","Rebuild the request payload using the UI export rather than manual JSON construction","Upgrade to a newer patch version if the stack trace points at a JSONUtils parsing bug"],"exampleFix":"// before\nparams.put(\"taskDefinitionJson\", rawStringFromUser)\n// after\nString json = validateTaskDefinitionJson(rawStringFromUser); // parse + required-field check first\nparams.put(\"taskDefinitionJson\", json)","handlingStrategy":"validation","validationCode":"// pre-validate payload structure and required fields\nList<TaskDefinitionLog> defs = JSONUtils.toList(json, TaskDefinitionLog.class);\nif (defs == null || defs.stream().anyMatch(d -> d.getName()==null || d.getTaskType()==null || d.getTaskParams()==null)) throw new IllegalArgumentException(\"malformed task definition\");","typeGuard":null,"tryCatchPattern":"try { ... } catch (ServiceException e) { if (e.getCode() == 10001) { checkServerLogsForRootCause(); } }","preventionTips":["Check server logs — this status hides the real exception","Never send nulls for required task fields","Build payloads programmatically from typed objects, not string concatenation"],"tags":["api","validation","unknown-exception","dolphinscheduler"],"backgroundTag":"invalid-argument-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"}