{"record":{"id":"580ac2add5213388","repo":"apache/dolphinscheduler","slug":"10134-580ac2","errorCode":"10134","errorMessage":"name must be not null","messagePattern":"name must be not null","errorType":"validation","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java","lineNumber":121,"sourceCode":"     *\n     * @param loginUser login user\n     * @param id        worker group id\n     * @param name      worker group name\n     * @param addrList  addr list\n     * @return create or update result code\n     */\n    @Override\n    public WorkerGroup saveWorkerGroup(User loginUser,\n                                       int id,\n                                       String name,\n                                       String addrList,\n                                       String description) {\n        if (!canOperatorPermissions(loginUser, null, AuthorizationType.WORKER_GROUP, WORKER_GROUP_CREATE)) {\n            // todo: add permission exception\n            throw new ServiceException(Status.USER_NO_OPERATION_PERM);\n        }\n        if (StringUtils.isEmpty(name)) {\n            throw new ServiceException(Status.NAME_NULL);\n        }\n        checkWorkerGroupAddrList(addrList);\n        final Date now = new Date();\n        final WorkerGroup workerGroup;\n        try {\n            if (id == 0) {\n                // insert\n                workerGroup = new WorkerGroup();\n                workerGroup.setCreateTime(now);\n                workerGroup.setName(name);\n                workerGroup.setAddrList(addrList);\n                workerGroup.setUpdateTime(now);\n                workerGroup.setDescription(description);\n                workerGroupDao.insert(workerGroup);\n            } else {\n                workerGroup = workerGroupDao.queryById(id);\n                if (workerGroup == null) {\n                    throw new ServiceException(Status.WORKER_GROUP_NOT_EXIST, id);","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java#L103-L139","documentation":"Status.NAME_NULL (10134) means the worker group name is empty. saveWorkerGroup validates with StringUtils.isEmpty(name) after the permission check and refuses to create or update a worker group without a name.","triggerScenarios":"Submitting the create/update worker-group API with name=\"\" or name=null; a UI form that allows submitting without filling the name field; programmatic calls building the request with a blank variable.","commonSituations":"Empty string vs missing form parameter confusion in curl calls (name= passes empty); scripts interpolating an unset shell variable into the name field.","solutions":["Provide a non-empty, unique name in the request.","Validate the name field client-side before submitting.","For scripts, use \"${NAME:?}\" style guards so an unset variable fails early.","Trim whitespace — a whitespace-only or empty value is still rejected."],"exampleFix":"// before\ncurl -d 'name=&addrList=ip:1234' .../worker-groups/save  # 10134\n// after\ncurl -d 'name=prod_group&addrList=ip:1234' .../worker-groups/save","handlingStrategy":"validation","validationCode":"if (name == null || name.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"worker group name must be non-empty\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    workerGroupService.saveWorkerGroup(loginUser, id, name, addrList, desc);\n} catch (ServiceException e) {\n    if (e.getCode() == 10134) { /* empty name: prompt user / fix request */ }\n}","preventionTips":["Require the name field in forms/API payloads","Trim input before submission","Guard script variables so empty values fail early","Add client-side required-field validation mirroring NAME_NULL"],"tags":["validation","worker-group","api"],"backgroundTag":"empty-required-field","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"}