From 95b6514c672c322bfa71ef802668ddd95c52e7bb Mon Sep 17 00:00:00 2001 From: yummygyudon Date: Sat, 25 Nov 2023 03:11:11 +0900 Subject: [PATCH] =?UTF-8?q?FIX=20:=20Getter=20=EB=A9=94=EC=84=9C=EB=93=9C?= =?UTF-8?q?=20=EC=9D=B4=EB=A6=84=20=EB=B0=8F=20=EB=B6=80=EB=AA=A8=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=20=ED=95=84=EB=93=9C=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopkerton/common/response/CommonControllerAdvice.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/sopt/sopkerton/common/response/CommonControllerAdvice.java b/src/main/java/org/sopt/sopkerton/common/response/CommonControllerAdvice.java index cbe91ce..09324c4 100644 --- a/src/main/java/org/sopt/sopkerton/common/response/CommonControllerAdvice.java +++ b/src/main/java/org/sopt/sopkerton/common/response/CommonControllerAdvice.java @@ -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; @@ -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) ); }