diff --git a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/CodeIsWrongException.java b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/CodeIsWrongException.java index aa3b5bb..767cf96 100644 --- a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/CodeIsWrongException.java +++ b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/CodeIsWrongException.java @@ -7,6 +7,6 @@ public class CodeIsWrongException extends BusinessException { public static final BusinessException EXCEPTION = new CodeIsWrongException(); public CodeIsWrongException() { - super(StatusEnum.CODE_IS_WRONG); + super(StatusEnum.INVALID_AUTH_CODE); } } diff --git a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/EmailAlreadyExistsException.java b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/EmailAlreadyExistsException.java index 3aaec80..dfc3d3e 100644 --- a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/EmailAlreadyExistsException.java +++ b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/email/EmailAlreadyExistsException.java @@ -7,6 +7,6 @@ public class EmailAlreadyExistsException extends BusinessException { public static final BusinessException EXCEPTION = new EmailAlreadyExistsException(); public EmailAlreadyExistsException() { - super(StatusEnum.EMAIL_ALREADY_EXIST); + super(StatusEnum.EMAIL_ALREADY_EXISTS); } } diff --git a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/member/NeedAuthCode.java b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/member/NeedAuthCode.java index 1544449..ae01d2a 100644 --- a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/member/NeedAuthCode.java +++ b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/custom/member/NeedAuthCode.java @@ -7,6 +7,6 @@ public class NeedAuthCode extends BusinessException { public static final BusinessException EXCEPTION = new NeedAuthCode(); public NeedAuthCode() { - super(StatusEnum.NEED_AUTH_CODE); + super(StatusEnum.MISSING_AUTH_CODE); } } diff --git a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/exception/StatusEnum.java b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/exception/StatusEnum.java index 74f1d2e..fc9d880 100644 --- a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/exception/StatusEnum.java +++ b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/error/exception/StatusEnum.java @@ -42,11 +42,10 @@ public enum StatusEnum { FILE_EXISTS(403, "파일이 이미 존재합니다."), //email - UNABLE_TO_SEND_EMAIL(403, "이메일을 보낼 수 없습니다."), - EMAIL_ALREADY_EXIST(404, "이메일이 이미 존재합니다"), - CODE_IS_WRONG(404, "인증코드가 옳지 않습니다."), - NEED_AUTH_CODE(404, "인증코드가 없습니다."), - + UNABLE_TO_SEND_EMAIL(500, "이메일 전송에 실패했습니다."), + EMAIL_ALREADY_EXISTS(409, "이메일 주소가 이미 사용 중입니다."), + INVALID_AUTH_CODE(400, "유효하지 않은 인증 코드입니다."), + MISSING_AUTH_CODE(400, "인증 코드가 제공되지 않았습니다."), //fcm MESSAGE_SEND_FAILED(403, "메세지 전송에 실패했습니다."), TOKEN_NOT_PROVIDED(400, "권한이 없습니다."), diff --git a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/infra/mail/MailService.java b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/infra/mail/MailService.java index c4006ba..f397d4d 100644 --- a/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/infra/mail/MailService.java +++ b/src/main/java/kr/hs/dgsw/SOPO_server_v2/global/infra/mail/MailService.java @@ -46,7 +46,7 @@ private MimeMessage generateEmailForm(String toEmail, helper.setText(message, true); javaMailSender.send(mimeMessage); } catch (Exception e) { - throw new kr.hs.dgsw.SOPO_server_v2.global.error.custom.auth.UnableToSendEmailException(); + throw new UnableToSendEmailException(); } return mimeMessage; }