Explorar o código

fix:修改创建gitlab账号错误时问题描述(可能原因:用户名或邮箱重复、密码未通过gitlab校验,gitlab token失效等)

zhangyi hai 1 ano
pai
achega
385bdebc35

+ 2 - 2
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/service/UserService.java

@@ -122,7 +122,7 @@ public class UserService {
             gitlabService.createGitlabUser(Math.toIntExact(savedUser.getId()), savedUser.getUsername(), password, savedUser.getEmail());
         } catch (SeecoderGitlabException e) {
             userRepository.delete(savedUser);
-            throw new CustomErrorException("用户名或邮箱已存在,请联系管理人员!");
+            throw new CustomErrorException("创建gitlab账号失败,请联系管理人员!");
         }
         log.debug("Created Information for User: {}", savedUser);
         return savedUser;
@@ -234,7 +234,7 @@ public class UserService {
         try {
             return gitlabService.createGitlabUser(Math.toIntExact(user.getId()), user.getUsername(), user.getPassword(), user.getEmail());
         } catch (SeecoderGitlabException e) {
-            throw new CustomErrorException("用户名或邮箱已存在,请联系管理人员!");
+            throw new CustomErrorException("创建gitlab账号失败,请联系管理人员!");
         }
     }