diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SimpleUserService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SimpleUserService.java index 8e11473309..8bbc5888dc 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/SimpleUserService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/SimpleUserService.java @@ -126,6 +126,7 @@ public class SimpleUserService { Map errorEmails = this.validateUserInfo(userCreateDTO.getUserInfoList().stream().map(UserCreateInfo::getEmail).toList()); if (MapUtils.isNotEmpty(errorEmails)) { response.setErrorEmails(errorEmails); + throw new MSException(SystemResultCode.INVITE_EMAIL_EXIST, JSON.toJSONString(errorEmails.keySet())); } else { response.setSuccessList(this.saveUserAndRole(userCreateDTO, source, operator, "/system/user/addUser")); }