Skip to content

Commit a227462

Browse files
committed
!hotfix: 핸들러에서 에러 메세지 출력하도록 수정
1 parent 738481d commit a227462

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/sponus/sponusbe/auth/jwt/filter/JwtExceptionFilter.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.sponus.sponusbe.auth.jwt.exception.SecurityCustomException;
99
import com.sponus.sponusbe.auth.jwt.exception.SecurityErrorCode;
1010
import com.sponus.sponusbe.auth.jwt.util.HttpResponseUtil;
11+
import com.sponus.sponusbe.global.common.ApiResponse;
1112
import com.sponus.sponusbe.global.common.BaseErrorCode;
1213

1314
import jakarta.servlet.FilterChain;
@@ -37,10 +38,15 @@ protected void doFilterInternal(
3738
);
3839
} catch (Exception e) {
3940
log.error(">>>>> Exception : ", e);
41+
ApiResponse<String> errorResponse = ApiResponse.onFailure(
42+
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getCode(),
43+
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getMessage(),
44+
e.getMessage()
45+
);
4046
HttpResponseUtil.setErrorResponse(
4147
response,
4248
HttpStatus.INTERNAL_SERVER_ERROR,
43-
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getErrorResponse()
49+
errorResponse
4450
);
4551
}
4652
}

0 commit comments

Comments
 (0)