From 6fc86a938f793209aeb45bd4c3d3cc1d2a84818b Mon Sep 17 00:00:00 2001 From: Jinwook94 Date: Sun, 31 Dec 2023 13:43:32 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20=EC=97=90=EB=9F=AC=20=EB=A1=9C=EA=B9=85?= =?UTF-8?q?=20=EB=A0=88=EB=B2=A8=20=EB=B3=80=EA=B2=BD:=20warn=20=E2=86=92?= =?UTF-8?q?=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/exception/GlobalExceptionHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java b/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java index 74849a9f..67e62ce3 100644 --- a/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java +++ b/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java @@ -29,7 +29,7 @@ public class GlobalExceptionHandler { public ResponseEntity methodArgumentExceptionHandler(final MethodArgumentNotValidException e, HttpServletRequest request) throws JsonProcessingException { MDC.put(REQUEST_INFO, getRequestInfo(request)); - log.warn("Method Argument Not Valid Exception", e); + log.error("Method Argument Not Valid Exception", e); String errorMessage = e.getBindingResult() .getFieldErrors() .get(0) @@ -43,7 +43,7 @@ public ResponseEntity badRequestExceptionHandler(final BadRequest HttpServletRequest request, HttpServletResponse response) throws JsonProcessingException { MDC.put(REQUEST_INFO, getRequestInfo(request)); - log.warn("Bad Request Exception", e); + log.error("Bad Request Exception", e); ErrorType errorType = e.getErrorType(); MDC.remove(REQUEST_INFO); @@ -54,7 +54,7 @@ public ResponseEntity badRequestExceptionHandler(final BadRequest @ExceptionHandler(UnauthorizedException.class) public ResponseEntity unauthorizedExceptionHandler(final UnauthorizedException e, HttpServletRequest request) throws JsonProcessingException { MDC.put(REQUEST_INFO, getRequestInfo(request)); - log.warn("Unauthorized Exception", e); + log.error("Unauthorized Exception", e); ErrorType errorType = e.getErrorType(); MDC.remove(REQUEST_INFO); return ResponseEntity.status(UNAUTHORIZED).body(ErrorResponse.of(errorType)); @@ -63,7 +63,7 @@ public ResponseEntity unauthorizedExceptionHandler(final Unauthor @ExceptionHandler(ForbiddenException.class) public ResponseEntity forbiddenExceptionHandler(final ForbiddenException e, HttpServletRequest request) throws JsonProcessingException { MDC.put(REQUEST_INFO, getRequestInfo(request)); - log.warn("Forbidden Exception", e); + log.error("Forbidden Exception", e); ErrorType errorType = e.getErrorType(); MDC.remove(REQUEST_INFO); return ResponseEntity.status(FORBIDDEN).body(ErrorResponse.of(errorType)); @@ -72,7 +72,7 @@ public ResponseEntity forbiddenExceptionHandler(final ForbiddenEx @ExceptionHandler(RuntimeException.class) public ResponseEntity handleRuntimeException(RuntimeException e, HttpServletRequest request) throws JsonProcessingException { MDC.put(REQUEST_INFO, getRequestInfo(request)); - log.warn("Runtime Exception", e); + log.error("Runtime Exception", e); MDC.remove(REQUEST_INFO); return ResponseEntity.internalServerError().body(ErrorResponse.of(RUNTIME_EXCEPTION)); }