-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: custom errorCode 정의 * feat: ExceptionResponse 스펙 수정 * refactor: ErrorCode 추가 및 적용 * refactor: Auth - 로그인 요청 custom errorCode 적용 * refactor: 수강과목 등록 - pdf parsing text custom errorCode 적용 * feat: StudentCategory - 학생 이수구분 카테고리에 졸업 카테고리가 포함 여부 검증 로직 추가 * feat: 유저아이디 찾기 커스텀 에러코드 적용 * feat: 유저검증 커스텀 에러코드 적용 * feat: 비밀번호 재설정 커스텀 에러코드 적용 * feat: 아이디 중복 체크 커스텀 에러코드 적용 * feat: 학번 중복 체크정 커스텀 에러코드 적용 * feat: 회원 탈퇴 커스텀 에러코드 적용 * feat: 회원가입 요청 커스텀 에러코드 적용 * refactor: GlobalExceptionHandler response 스펙 수정 * refactor: 불필요 import 제거
- Loading branch information
Showing
41 changed files
with
335 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/plzgraduate/myongjigraduatebe/core/exception/ErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.plzgraduate.myongjigraduatebe.core.exception; | ||
|
||
public enum ErrorCode { | ||
|
||
INTERNAL_SEVER_ERROR, | ||
INVALIDATED_GRADUATION_CATEGORY, | ||
UNFITTED_GRADUATION_CATEGORY, | ||
UNREGISTERED_USER, | ||
INVALIDATED_STUDENT_NUMBER_TYPE, | ||
INVALIDATED_PASSWORD_TYPE, | ||
MISMATCHED_PASSWORD, | ||
NOT_FOUND_AUTHID, | ||
INVALIDATED_AUTHID_TYPE, | ||
INCORRECT_PASSWORD, | ||
DUPLICATED_STUDENT_NUMBER, | ||
DUPLICATED_AUTHID, | ||
NOT_FOUND_STUDENT_NUMBER, | ||
INVALIDATED_AUTH_TOKEN, | ||
INCORRECT_STUDENT_NUMBER, | ||
NON_EXISTED_LECTURE, | ||
UNSUPPORTED_STUDENT_CATEGORY, | ||
UNSUPPORTED_STUDENT_NUMBER, | ||
AUTHENTICATION_FAIL_FORBIDDEN, | ||
AUTHENTICATION_FAIL_UNAUTHORIZED | ||
} |
20 changes: 5 additions & 15 deletions
20
src/main/java/com/plzgraduate/myongjigraduatebe/core/exception/ExceptionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
package com.plzgraduate.myongjigraduatebe.core.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ExceptionResponse { | ||
|
||
private final int status; | ||
private final String message; | ||
private final String errorCode; | ||
|
||
private ExceptionResponse( | ||
int status, | ||
String message | ||
) { | ||
this.status = status; | ||
this.message = message; | ||
private ExceptionResponse(String errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
|
||
public static ExceptionResponse of( | ||
HttpStatus httpStatus, | ||
String message | ||
) { | ||
return new ExceptionResponse(httpStatus.value(), message); | ||
public static ExceptionResponse from(String errorCode) { | ||
return new ExceptionResponse(errorCode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
...main/java/com/plzgraduate/myongjigraduatebe/user/api/findauthid/FindAuthIdController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.