Skip to content

Commit

Permalink
fix : 에러메시지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayon-Hong committed Aug 6, 2024
1 parent c2305dd commit 7b8bbf6
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.isp.backend.domain.schedule.repository.ScheduleRepository;
import com.isp.backend.domain.scheduleDetail.entity.ScheduleDetail;
import com.isp.backend.domain.scheduleDetail.repository.ScheduleDetailRepository;
import com.isp.backend.global.exception.member.MemberNotFoundException;
import com.isp.backend.global.exception.common.MemberNotFoundException;
import com.isp.backend.global.exception.schedule.CountryNotFoundException;
import com.isp.backend.global.exception.schedule.NotYourScheduleException;
import com.isp.backend.global.exception.schedule.ScheduleNotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public enum ErrorCode {

// Common
MEMBER_NOT_FOUND(HttpStatus.UNAUTHORIZED, "U001", "사용자를 찾을 수 없습니다."),
SOCIAL_AUTHENTICATION_FAILED(HttpStatus.UNAUTHORIZED, "U002", "사용자가 OAuth2 로그인에 실패하였습니다."),
MEMBER_NOT_ACTIVATED(HttpStatus.BAD_REQUEST, "U003", "사용자가 활성화 상태가 아닙니다."),
MEMBER_NOT_ACTIVATED(HttpStatus.BAD_REQUEST, "U002", "사용자가 활성화 상태가 아닙니다."),
AUTHENTICATION_FAILED(HttpStatus.FORBIDDEN, "U003", "권한이 없는 요청입니다. 토큰을 추가해주세요."),
ACCESS_TOKEN_IS_INVALID(HttpStatus.UNAUTHORIZED, "U004", "엑세스 토큰이 유효하지 않습니다."),
REFRESH_TOKEN_IS_INVALID(HttpStatus.UNAUTHORIZED, "U005", "리프레시 토큰이 유효하지 않습니다."),

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.isp.backend.global.exception.common;

import com.isp.backend.global.exception.CustomException;
import com.isp.backend.global.exception.ErrorCode;

public class AccessTokenInvalidException extends CustomException {
public AccessTokenInvalidException() {
super(ErrorCode.ACCESS_TOKEN_IS_INVALID);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.isp.backend.global.exception.common;

import com.isp.backend.global.exception.CustomException;
import com.isp.backend.global.exception.ErrorCode;

public class AuthenticationFailedException extends CustomException {

public AuthenticationFailedException() {super(ErrorCode.AUTHENTICATION_FAILED);}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.isp.backend.global.exception.common;

import com.isp.backend.global.exception.CustomException;
import com.isp.backend.global.exception.ErrorCode;

public class MemberNotActivatedException extends CustomException {

public MemberNotActivatedException() {
super(ErrorCode.MEMBER_NOT_ACTIVATED);
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.isp.backend.global.exception.common;

import com.isp.backend.global.exception.CustomException;
import com.isp.backend.global.exception.ErrorCode;

public class MemberNotFoundException extends CustomException {

public MemberNotFoundException() {
super(ErrorCode.MEMBER_NOT_FOUND);
}

}

This file was deleted.

0 comments on commit 7b8bbf6

Please sign in to comment.