From 5c7750a148f11876f877924df5b73b7f2bc743a7 Mon Sep 17 00:00:00 2001 From: seokjin8678 Date: Fri, 22 Mar 2024 22:12:42 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=98=88=EC=99=B8=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=EB=A1=9C=EA=B7=B8=20=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/festago/common/aop/LogRequestBodyAspect.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/com/festago/common/aop/LogRequestBodyAspect.java b/backend/src/main/java/com/festago/common/aop/LogRequestBodyAspect.java index 90aa094b7..205d4d6b0 100644 --- a/backend/src/main/java/com/festago/common/aop/LogRequestBodyAspect.java +++ b/backend/src/main/java/com/festago/common/aop/LogRequestBodyAspect.java @@ -85,8 +85,10 @@ private String getRequestPayload(HttpServletRequest request) { try { ContentCachingRequestWrapper cachedRequest = (ContentCachingRequestWrapper) request; return objectMapper.readTree(cachedRequest.getContentAsByteArray()).toPrettyString(); - } catch (IOException | ClassCastException e) { + } catch (IOException e) { log.warn("ObjectMapper에서 직렬화 중에 문제가 발생했습니다.", e); + } catch (ClassCastException e) { + log.warn("HttpServletRequest 객체를 ContentCachingRequestWrapper 타입으로 형변환 하는 중 문제가 발생했습니다.", e); } return "[ObjectMapper에서 직렬화 중에 문제가 발생했습니다.]"; }