apache/dolphinscheduler · error · ServiceException

DESCRIPTION_TOO_LONG_ERROR

DESCRIPTION_TOO_LONG_ERROR

Error message

Parameter description is too long.

What it means

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.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java:81

    @Autowired
    private ProjectDao projectDao;

    @Autowired
    private ProjectUserDao projectUserDao;

    @Autowired
    private TaskGroupQueueService taskGroupQueueService;

    @Autowired
    private ExecutorService executorService;

    @Override
    @Transactional
    public TaskGroup createTaskGroup(User loginUser, Long projectCode, String name, String description, int groupSize) {
        requireProjectPerm(loginUser, projectCode, true);
        if (checkDescriptionLength(description)) {
            log.warn("Parameter description is too long.");
            throw new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR);
        }
        if (name == null) {
            log.warn("Parameter name can ot be null.");
            throw new ServiceException(Status.NAME_NULL);
        }
        if (groupSize <= 0) {
            log.warn("Parameter task group size is must bigger than 1.");
            throw new ServiceException(Status.TASK_GROUP_SIZE_ERROR);
        }
        TaskGroup duplicate = taskGroupMapper.queryByName(loginUser.getId(), name);
        if (duplicate != null) {
            log.warn("Task group with the same name already exists, taskGroupName:{}.", duplicate.getName());
            throw new ServiceException(Status.TASK_GROUP_NAME_EXSIT);
        }
        Date now = new Date();
        TaskGroup taskGroup = TaskGroup.builder()
                .name(name)

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Shorten the description to within the configured maximum before submitting.
  2. Check the task-group configuration keys (task.group.description.max-length etc.) to learn the current limit.
  3. Move long notes into external documentation and keep a short pointer in the description.
  4. If the limit is genuinely too small for your workflow, raise the configuration value (and verify the DB column size) rather than truncating silently.

Example fix

// before
await createTaskGroup({ name: 'etl-group', description: longNote, groupSize: 10 })
// after
const MAX_DESC = 255
await createTaskGroup({ name: 'etl-group', description: longNote.slice(0, MAX_DESC), groupSize: 10 })
Defensive patterns

Strategy: validation

Validate before calling

const MAX_TASK_GROUP_DESC = 255 // match server config
function isDescriptionValid(desc: string | undefined): boolean {
  return typeof desc === 'string' && desc.length <= MAX_TASK_GROUP_DESC
}

Type guard

function hasValidDescription(d: unknown): d is string {
  return typeof d === 'string' && d.length <= 255
}

Try / catch

try {
  await createTaskGroup(payload)
} catch (e) {
  if (isServiceException(e, 'DESCRIPTION_TOO_LONG_ERROR')) {
    payload.description = payload.description.slice(0, MAX_TASK_GROUP_DESC)
    await createTaskGroup(payload)
  } else throw e
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: payload too large / request exceeds maximum size: why libraries cap bytes and how to fix oversize payloads — this error's family across 50 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/b60e8d824a156488. Report an issue: GitHub.