From a227462aac7a3d513598ae962298dbc8afba7a25 Mon Sep 17 00:00:00 2001 From: marooo326 Date: Tue, 30 Jan 2024 13:57:49 +0900 Subject: [PATCH] =?UTF-8?q?!hotfix:=20=ED=95=B8=EB=93=A4=EB=9F=AC=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=97=90=EB=9F=AC=20=EB=A9=94=EC=84=B8=EC=A7=80=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sponusbe/auth/jwt/filter/JwtExceptionFilter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sponus/sponusbe/auth/jwt/filter/JwtExceptionFilter.java b/src/main/java/com/sponus/sponusbe/auth/jwt/filter/JwtExceptionFilter.java index f0a9cb82..61ea17cc 100644 --- a/src/main/java/com/sponus/sponusbe/auth/jwt/filter/JwtExceptionFilter.java +++ b/src/main/java/com/sponus/sponusbe/auth/jwt/filter/JwtExceptionFilter.java @@ -8,6 +8,7 @@ import com.sponus.sponusbe.auth.jwt.exception.SecurityCustomException; import com.sponus.sponusbe.auth.jwt.exception.SecurityErrorCode; import com.sponus.sponusbe.auth.jwt.util.HttpResponseUtil; +import com.sponus.sponusbe.global.common.ApiResponse; import com.sponus.sponusbe.global.common.BaseErrorCode; import jakarta.servlet.FilterChain; @@ -37,10 +38,15 @@ protected void doFilterInternal( ); } catch (Exception e) { log.error(">>>>> Exception : ", e); + ApiResponse errorResponse = ApiResponse.onFailure( + SecurityErrorCode.INTERNAL_SECURITY_ERROR.getCode(), + SecurityErrorCode.INTERNAL_SECURITY_ERROR.getMessage(), + e.getMessage() + ); HttpResponseUtil.setErrorResponse( response, HttpStatus.INTERNAL_SERVER_ERROR, - SecurityErrorCode.INTERNAL_SECURITY_ERROR.getErrorResponse() + errorResponse ); } }