Skip to content

Commit

Permalink
FIX: (#145) 판매점 도메인 예외 계층을 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
anxi01 committed Feb 20, 2025
1 parent c998099 commit 79c1272
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/com/zerozero/store/exception/StoreErrorType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.zerozero.store.exception;

import com.zerozero.core.support.error.ErrorType;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;

@Getter
@RequiredArgsConstructor
public enum StoreErrorType implements ErrorType {
NOT_EXIST_STORE(HttpStatus.BAD_REQUEST, "판매점이 존재하지 않습니다."),
NOT_EXIST_SEARCH_RESPONSE(HttpStatus.BAD_REQUEST, "검색 응답이 존재하지 않습니다."),
KAKAO_SERVICE_UNAVAILABLE(HttpStatus.SERVICE_UNAVAILABLE, "KAKAO REST API가 동작하지 않습니다."),
;

private final HttpStatus status;

private final String message;
}
15 changes: 15 additions & 0 deletions src/main/java/com/zerozero/store/exception/StoreException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.zerozero.store.exception;

import com.zerozero.core.support.error.CoreException;
import com.zerozero.core.support.error.ErrorType;

public class StoreException extends CoreException {

public StoreException(ErrorType errorType) {
super(errorType);
}

public StoreException(ErrorType errorType, Object data) {
super(errorType, data);
}
}

0 comments on commit 79c1272

Please sign in to comment.