{"record":{"id":"06231b8ea8c6e106","repo":"apache/dolphinscheduler","slug":"10134","errorCode":"10134","errorMessage":"name must be not null","messagePattern":"name must be not null","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java","lineNumber":86,"sourceCode":"    private ProjectUserDao projectUserDao;\n\n    @Autowired\n    private TaskGroupQueueService taskGroupQueueService;\n\n    @Autowired\n    private ExecutorService executorService;\n\n    @Override\n    @Transactional\n    public TaskGroup createTaskGroup(User loginUser, Long projectCode, String name, String description, int groupSize) {\n        requireProjectPerm(loginUser, projectCode, true);\n        if (checkDescriptionLength(description)) {\n            log.warn(\"Parameter description is too long.\");\n            throw new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR);\n        }\n        if (name == null) {\n            log.warn(\"Parameter name can ot be null.\");\n            throw new ServiceException(Status.NAME_NULL);\n        }\n        if (groupSize <= 0) {\n            log.warn(\"Parameter task group size is must bigger than 1.\");\n            throw new ServiceException(Status.TASK_GROUP_SIZE_ERROR);\n        }\n        TaskGroup duplicate = taskGroupMapper.queryByName(loginUser.getId(), name);\n        if (duplicate != null) {\n            log.warn(\"Task group with the same name already exists, taskGroupName:{}.\", duplicate.getName());\n            throw new ServiceException(Status.TASK_GROUP_NAME_EXSIT);\n        }\n        Date now = new Date();\n        TaskGroup taskGroup = TaskGroup.builder()\n                .name(name)\n                .projectCode(projectCode)\n                .description(description)\n                .groupSize(groupSize)\n                .userId(loginUser.getId())\n                .status(Flag.YES)","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java#L68-L104","documentation":"createTaskGroup requires a non-null group name; a null name fails with Status.NAME_NULL (code 10134) before any duplicate/size checks. The name is a mandatory identity attribute for a task group, so it is validated early and hard.","triggerScenarios":"POST /task-group/update-or-create with the name field omitted, explicitly null in the JSON body, or bound to null by a controller when the query/form parameter is absent.","commonSituations":"Scripts or UI forms that omit the name field; JSON bodies missing \"name\"; clients that only send name when it changed (copying update semantics to the create path).","solutions":["Provide a non-null name in the request body/form parameters.","Add client-side validation requiring name before submitting.","Check controller binding so the name parameter is actually mapped."],"exampleFix":"// before\ncreateTaskGroup(user, projectCode, null, desc, 10);\n// after\nif (name == null || name.isEmpty()) throw new IllegalArgumentException(\"name required\");\ncreateTaskGroup(user, projectCode, name, desc, 10);","handlingStrategy":"validation","validationCode":"if (name == null || name.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"task group name is required\");\n}","typeGuard":null,"tryCatchPattern":"try { api.createTaskGroup(u, pc, name, desc, size); }\ncatch (ServiceException e) { if (e.getCode() == 10134) { promptForName(); } }","preventionTips":["Mark name as a required field in forms and API payloads","Never build create requests from partially populated DTOs","Validate required fields in one shared pre-flight function"],"tags":["validation","null","task-group"],"backgroundTag":"missing-required-argument","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"}