{"record":{"id":"b60e8d824a156488","repo":"apache/dolphinscheduler","slug":"description-too-long-error-b60e8d","errorCode":"DESCRIPTION_TOO_LONG_ERROR","errorMessage":"Parameter description is too long.","messagePattern":"Parameter description is too long\\.","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java","lineNumber":81,"sourceCode":"\n    @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)","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java#L63-L99","documentation":"createTaskGroup validates the task-group description length before creating the group; if checkDescriptionLength reports the description exceeds the configured maximum, it throws ServiceException(DESCRIPTION_TOO_LONG_ERROR). The bound comes from the task-group configuration (max description length), so it fails fast inside a @Transactional method without writing.","triggerScenarios":"Calling the task-group create API with a description string longer than the configured limit (default task group description max length, typically 255/200 chars depending on configuration).","commonSituations":"Pasting long operational notes into the description field; automated provisioning scripts embedding long JSON in descriptions; databases/config where task-group-related length settings were lowered after groups were designed.","solutions":["Shorten the description to within the configured maximum before submitting.","Check the task-group configuration keys (task.group.description.max-length etc.) to learn the current limit.","Move long notes into external documentation and keep a short pointer in the description.","If the limit is genuinely too small for your workflow, raise the configuration value (and verify the DB column size) rather than truncating silently."],"exampleFix":"// before\nawait createTaskGroup({ name: 'etl-group', description: longNote, groupSize: 10 })\n// after\nconst MAX_DESC = 255\nawait createTaskGroup({ name: 'etl-group', description: longNote.slice(0, MAX_DESC), groupSize: 10 })","handlingStrategy":"validation","validationCode":"const MAX_TASK_GROUP_DESC = 255 // match server config\nfunction isDescriptionValid(desc: string | undefined): boolean {\n  return typeof desc === 'string' && desc.length <= MAX_TASK_GROUP_DESC\n}","typeGuard":"function hasValidDescription(d: unknown): d is string {\n  return typeof d === 'string' && d.length <= 255\n}","tryCatchPattern":"try {\n  await createTaskGroup(payload)\n} catch (e) {\n  if (isServiceException(e, 'DESCRIPTION_TOO_LONG_ERROR')) {\n    payload.description = payload.description.slice(0, MAX_TASK_GROUP_DESC)\n    await createTaskGroup(payload)\n  } else throw e\n}","preventionTips":["Mirror the server's description max length in the form's maxlength attribute.","Show a live character counter on the description field.","Keep long operational notes in external docs and link them from the description."],"tags":["parameter-validation","length-limit","api"],"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-14T00:17:10.932Z"}