-
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.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/com/zerozero/user/exception/UserErrorType.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,19 @@ | ||
package com.zerozero.user.exception; | ||
|
||
import com.zerozero.core.support.error.ErrorType; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum UserErrorType implements ErrorType { | ||
NOT_EXIST_USER(HttpStatus.NOT_FOUND, "존재하지 않는 사용자입니다."), | ||
NOT_COMPLETED_MEMBER(HttpStatus.FORBIDDEN, "회원가입이 완료되지 않은 사용자입니다."), | ||
ALREADY_REGISTERED_USER(HttpStatus.BAD_REQUEST, "이미 회원가입이 완료된 사용자입니다."), | ||
; | ||
|
||
private final HttpStatus status; | ||
|
||
private final String message; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/zerozero/user/exception/UserException.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,15 @@ | ||
package com.zerozero.user.exception; | ||
|
||
import com.zerozero.core.support.error.CoreException; | ||
import com.zerozero.core.support.error.ErrorType; | ||
|
||
public class UserException extends CoreException { | ||
|
||
public UserException(ErrorType errorType) { | ||
super(errorType); | ||
} | ||
|
||
public UserException(ErrorType errorType, Object data) { | ||
super(errorType, data); | ||
} | ||
} |