{"record":{"id":"57474111da4e0d99","repo":"apache/dolphinscheduler","slug":"1400004-574741","errorCode":"1400004","errorMessage":"description is too long error","messagePattern":"description is too long error","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"warning","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java","lineNumber":142,"sourceCode":"     * create tenant\n     *\n     * @param loginUser login user\n     * @param tenantCode tenant code\n     * @param queueId queue id\n     * @param desc description\n     * @return create result code\n     */\n    @Override\n    @Transactional(rollbackFor = Exception.class)\n    public Tenant createTenant(User loginUser,\n                               String tenantCode,\n                               int queueId,\n                               String desc) {\n        if (!canOperatorPermissions(loginUser, null, AuthorizationType.TENANT, TENANT_CREATE)) {\n            throw new ServiceException(Status.USER_NO_OPERATION_PERM);\n        }\n        if (checkDescriptionLength(desc)) {\n            throw new ServiceException(Status.DESCRIPTION_TOO_LONG_ERROR);\n        }\n        Tenant tenant = new Tenant(tenantCode, desc, queueId);\n        createTenantValid(tenant);\n        tenantDao.insert(tenant);\n\n        return tenant;\n    }\n\n    /**\n     * query tenant list paging\n     *\n     * @param loginUser login user\n     * @param searchVal search value\n     * @param pageNo    page number\n     * @param pageSize  page size\n     * @return tenant list page\n     */\n    @Override","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java#L124-L160","documentation":"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.","triggerScenarios":"POST /dolphinscheduler/tenants/create with a desc parameter exceeding the max description length.","commonSituations":"Pasting long markdown/notes into the description field; automation writing full URLs or JSON blobs as descriptions.","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"],"exampleFix":"// before\ncreateTenant(loginUser, \"team_a\", queueId, longMarkdownNotes); // > max\n// after\ncreateTenant(loginUser, \"team_a\", queueId, \"Team A shared tenant\");","handlingStrategy":"validation","validationCode":"if (desc != null && desc.length() > 255) { throw new IllegalArgumentException(\"desc too long\"); }","typeGuard":null,"tryCatchPattern":"try { tenantService.createTenant(user, code, queueId, desc); } catch (ServiceException e) { if (e.getCode() == 1400004) { /* truncate desc and retry */ } }","preventionTips":["Cap descriptions at the DB column length (e.g. 255)","Truncate programmatically before submit","Store long docs externally and link from desc"],"tags":["validation","tenant","length-limit"],"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"}