-
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/image/exception/ImageErrorType.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.image.exception; | ||
|
||
import com.zerozero.core.support.error.ErrorType; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum ImageErrorType implements ErrorType { | ||
INVALID_IMAGE_PREFIX(HttpStatus.BAD_REQUEST, "유효하지 않은 prefix 값입니다."), | ||
INVALID_IMAGE_EXTENSION(HttpStatus.BAD_REQUEST, "유효하지 않은 확장자입니다."), | ||
FAILED_TO_MAKE_URL(HttpStatus.INTERNAL_SERVER_ERROR, "PreSigned URL 생성에 실패했습니다."), | ||
; | ||
|
||
private final HttpStatus status; | ||
|
||
private final String message; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/zerozero/image/exception/ImageException.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.image.exception; | ||
|
||
import com.zerozero.core.support.error.CoreException; | ||
import com.zerozero.core.support.error.ErrorType; | ||
|
||
public class ImageException extends CoreException { | ||
|
||
public ImageException(ErrorType errorType) { | ||
super(errorType); | ||
} | ||
|
||
public ImageException(ErrorType errorType, Object data) { | ||
super(errorType, data); | ||
} | ||
} |