{"record":{"id":"1fcb6f10321d14eb","repo":"apache/dolphinscheduler","slug":"10001-1fcb6f","errorCode":"10001","errorMessage":"request parameter {msg} is not valid","messagePattern":"request parameter (.+?) is not valid","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java","lineNumber":132,"sourceCode":"     */\n    @Override\n    @Transactional(rollbackFor = Exception.class)\n    public User createUser(User loginUser,\n                           String userName,\n                           String userPassword,\n                           String email,\n                           int tenantId,\n                           String phone,\n                           String queue,\n                           int state) throws Exception {\n        if (!isAdmin(loginUser)) {\n            throw new ServiceException(Status.USER_NO_OPERATION_PERM);\n        }\n\n        // check all user params\n        String msg = this.checkUserParams(userName, userPassword, email, phone);\n        if (!StringUtils.isEmpty(msg)) {\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, msg);\n        }\n\n        if (!checkTenantExists(tenantId)) {\n            log.warn(\"Tenant does not exist, tenantId:{}.\", tenantId);\n            throw new ServiceException(Status.TENANT_NOT_EXIST);\n        }\n\n        User user = createUser(userName, userPassword, email, tenantId, phone, queue, state);\n        log.info(\"User is created and id is {}.\", user.getId());\n        return user;\n    }\n\n    @Override\n    @Transactional\n    public User createUser(String userName,\n                           String userPassword,\n                           String email,\n                           int tenantId,","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java#L114-L150","documentation":"Thrown in UsersServiceImpl.createUser after checkUserParams returns a non-empty message: one of userName, userPassword, email or phone failed format/existence validation. The generic guard fires for any invalid request parameter, and msg names the specific field at fault (e.g. user name exists, email format wrong).","triggerScenarios":"Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the parameter indicated in the msg placeholder (user name/password length, email format, phone format)","If msg says the user name already exists, choose a different userName","Validate input client-side before submitting to avoid repeated rejections"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}