diff --git a/src/main/java/team7/inplace/global/exception/code/BannerErrorCode.java b/src/main/java/team7/inplace/global/exception/code/BannerErrorCode.java new file mode 100644 index 00000000..20809c4c --- /dev/null +++ b/src/main/java/team7/inplace/global/exception/code/BannerErrorCode.java @@ -0,0 +1,32 @@ +package team7.inplace.global.exception.code; + +import org.springframework.http.HttpStatus; + +public enum BannerErrorCode implements ErrorCode { + NOT_FOUND("B001", "배너를 찾을 수 없습니다.", HttpStatus.NOT_FOUND); + + private final String code; + private final String message; + private final HttpStatus httpStatus; + + BannerErrorCode(String code, String message, HttpStatus httpStatus) { + this.code = code; + this.message = message; + this.httpStatus = httpStatus; + } + + @Override + public HttpStatus httpStatus() { + return httpStatus; + } + + @Override + public String code() { + return code; + } + + @Override + public String message() { + return message; + } +}