|
| 1 | +package timeeat.exception; |
| 2 | + |
| 3 | +import lombok.Getter; |
| 4 | +import org.springframework.http.HttpStatus; |
| 5 | + |
| 6 | +@Getter |
| 7 | +public enum EtcErrorCode { |
| 8 | + |
| 9 | + CLIENT_REQUEST_ERROR("CLIENT001", "클라이언트 요청이 잘못되었습니다.", HttpStatus.BAD_REQUEST), |
| 10 | + METHOD_ARGUMENT_TYPE_MISMATCH("CLIENT002", "요청 타입이 일치하지 않습니다.", HttpStatus.BAD_REQUEST), |
| 11 | + ALREADY_DISCONNECTED("CLIENT003", "이미 클라이언트에서 요청이 종료되었습니다.", HttpStatus.BAD_REQUEST), |
| 12 | + METHOD_NOT_SUPPORTED("CLIENT004", "허용되지 않은 메서드입니다.", HttpStatus.METHOD_NOT_ALLOWED), |
| 13 | + MEDIA_TYPE_NOT_SUPPORTED("CLIENT005", "허용되지 않은 미디어 타입입니다.", HttpStatus.UNSUPPORTED_MEDIA_TYPE), |
| 14 | + NO_RESOURCE_FOUND("CLIENT006", "요청한 리소스를 찾을 수 없습니다.", HttpStatus.NOT_FOUND), |
| 15 | + NO_COOKIE_FOUND("CLIENT007", "필수 쿠키 값이 존재하지 않습니다.", HttpStatus.BAD_REQUEST), |
| 16 | + |
| 17 | + INTERNAL_SERVER_ERROR("SERVER001", "서버 내부 에러가 발생했습니다.", HttpStatus.INTERNAL_SERVER_ERROR), |
| 18 | + ; |
| 19 | + |
| 20 | + private final String code; |
| 21 | + private final String message; |
| 22 | + private final HttpStatus status; |
| 23 | + |
| 24 | + EtcErrorCode(String code, String message, HttpStatus status) { |
| 25 | + this.code = code; |
| 26 | + this.message = message; |
| 27 | + this.status = status; |
| 28 | + } |
| 29 | +} |
0 commit comments