{"record":{"id":"163a5883b7b5733b","repo":"apache/dolphinscheduler","slug":"1400004-163a58","errorCode":"1400004","errorMessage":"description is too long error","messagePattern":"description is too long error","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java","lineNumber":82,"sourceCode":"    @Autowired\n    private ProjectDao projectDao;\n\n    @Autowired\n    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)","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java#L64-L100","documentation":"createTaskGroup rejects the request because the supplied task-group description exceeds the maximum allowed length (enforced by checkDescriptionLength). DolphinScheduler limits description size so task-group metadata stays compact in the DB and API responses. The call fails fast with status DESCRIPTION_TOO_LONG_ERROR (code 1400004) before any insert is attempted.","triggerScenarios":"Calling POST /task-group/update-or-create (create path) with a description string longer than the configured max length (TaskGroupConfiguration taskGroupDescLength, default 255). Also triggered when a client copies a long workflow/task description into the group description field.","commonSituations":"Clients pasting long free-text notes or Markdown into the description field; UI not enforcing maxLength; API scripts building groups programmatically with generated long descriptions.","solutions":["Shorten the description to within the allowed limit (default 255 chars).","Check dolphinscheduler task-group desc length config (task-group-desc-length) and align client-side maxLength with it.","Truncate the description in client code before calling the API."],"exampleFix":"// before\ngroup.setDescription(longText);\napiClient.createTaskGroup(user, projectCode, name, longText, size);\n// after\nString desc = longText != null && longText.length() > 255 ? longText.substring(0, 255) : longText;\napiClient.createTaskGroup(user, projectCode, name, desc, size);","handlingStrategy":"validation","validationCode":"if (description != null && description.length() > 255) {\n    throw new IllegalArgumentException(\"description exceeds max length\");\n}","typeGuard":null,"tryCatchPattern":"try { api.createTaskGroup(u, pc, name, desc, size); }\ncatch (ServiceException e) { if (e.getCode() == 1400004) { desc = desc.substring(0, 255); retry(); } }","preventionTips":["Enforce maxLength=255 on description inputs in the UI","Read the task-group-desc-length config and mirror it client-side","Truncate descriptions centrally in your API client wrapper"],"tags":["validation","api","task-group"],"backgroundTag":"payload-too-large","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}