Skip to content

Commit

Permalink
FIX : Getter 메서드 이름 및 부모 클래스 필드 구조 변경에 따른 코드 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Nov 24, 2023
1 parent 56d3214 commit 95b6514
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import lombok.RequiredArgsConstructor;

import org.sopt.sopkerton.common.exception.base.ErrorBase;
import org.sopt.sopkerton.common.exception.base.ExceptionBase;

import org.springframework.http.ResponseEntity;
Expand All @@ -14,10 +15,11 @@ public class CommonControllerAdvice {

@ExceptionHandler(value = ExceptionBase.class)
public ResponseEntity<?> sopkathonExceptionHandler(ExceptionBase exception) {
ErrorBase error = exception.getError();
return ResponseEntity
.status(exception.getStatus())
.status(error.getHttpStatus())
.body(
ApiResponse.error(exception.getErrorBase(), exception)
ApiResponse.error(error)
);
}

Expand Down

0 comments on commit 95b6514

Please sign in to comment.