Skip to content

Commit

Permalink
Merge pull request #59 from Sopo2023/feat/#55
Browse files Browse the repository at this point in the history
chore: error code
  • Loading branch information
GayeongKimm authored Aug 12, 2024
2 parents 6251be4 + 294eaf1 commit 31190d9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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, "권한이 없습니다."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 31190d9

Please sign in to comment.