apache/dolphinscheduler · warning · ServiceException
1400004
1400004
Error message
description is too long error
What it means
createTenant calls checkDescriptionLength(desc); a description longer than the configured maximum throws DESCRIPTION_TOO_LONG_ERROR (code 1400004). The tenant description column has a bounded length in the DB.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java:142
* create tenant
*
* @param loginUser login user
* @param tenantCode tenant code
* @param queueId queue id
* @param desc description
* @return create result code
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Tenant createTenant(User loginUser,
String tenantCode,
int queueId,
String desc) {
if (!canOperatorPermissions(loginUser, null, AuthorizationType.TENANT, TENANT_CREATE)) {
throw new ServiceException(Status.USER_NO_OPERATION_PERM);
}
if (checkDescriptionLength(desc)) {
throw new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR);
}
Tenant tenant = new Tenant(tenantCode, desc, queueId);
createTenantValid(tenant);
tenantDao.insert(tenant);
return tenant;
}
/**
* query tenant list paging
*
* @param loginUser login user
* @param searchVal search value
* @param pageNo page number
* @param pageSize page size
* @return tenant list page
*/
@OverrideView on GitHub (pinned to 02eac45a1b)
Solutions
- Shorten the description below the maximum allowed length
- Move extended documentation into an external doc and keep a short summary in desc
- Validate desc length in the client before submitting
Example fix
// before createTenant(loginUser, "team_a", queueId, longMarkdownNotes); // > max // after createTenant(loginUser, "team_a", queueId, "Team A shared tenant");
Defensive patterns
Strategy: validation
Validate before calling
if (desc != null && desc.length() > 255) { throw new IllegalArgumentException("desc too long"); } Try / catch
try { tenantService.createTenant(user, code, queueId, desc); } catch (ServiceException e) { if (e.getCode() == 1400004) { /* truncate desc and retry */ } } Prevention
- Cap descriptions at the DB column length (e.g. 255)
- Truncate programmatically before submit
- Store long docs externally and link from desc
When it happens
Trigger: POST /dolphinscheduler/tenants/create with a desc parameter exceeding the max description length.
Common situations: Pasting long markdown/notes into the description field; automation writing full URLs or JSON blobs as descriptions.
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/57474111da4e0d99.
Report an issue: GitHub.