From f919af96e5e083ad462a5e71c00ff148ebdb91c6 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 목, 20 1월 2022 15:23:28 +0900
Subject: [PATCH] - 오토 컴플릿 항목 선택하면 목록 사라지게 수정 - 업체 메일 발송 시 템플릿 선택 문구 변경 - 연락처 입력 폼 정규식 제거하고 숫자만 입력 가능하게 수정 - 모든 사용자 필드(날짜) 24시간 타입으로 변경

---
 src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java b/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java
index 560217e..e7d3346 100644
--- a/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java
+++ b/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java
@@ -3,6 +3,8 @@
 import kr.wisestone.owl.common.MessageAccessor;
 import kr.wisestone.owl.constant.Constants;
 import kr.wisestone.owl.constant.MsgConstants;
+import kr.wisestone.owl.exception.ApiAuthException;
+import kr.wisestone.owl.exception.ApiParameterException;
 import kr.wisestone.owl.exception.OwlRuntimeException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -32,6 +34,22 @@
 
     public OwlResponseEntityExceptionHandler() {
         super();
+    }
+
+    @ExceptionHandler({ApiParameterException.class })
+    public ResponseEntity<Object> handleBadRequest(final ApiParameterException ex, final WebRequest request) {
+        Map<String, Object> resJsonData = new HashMap<String, Object>();
+        resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(ex, Constants.RES_KEY_MSG_FAIL));
+
+        return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.BAD_REQUEST, request);
+    }
+
+    @ExceptionHandler({ApiAuthException.class })
+    public ResponseEntity<Object> handleBadRequest(final ApiAuthException ex, final WebRequest request) {
+        Map<String, Object> resJsonData = new HashMap<String, Object>();
+        resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(ex, Constants.RES_KEY_MSG_FAIL));
+
+        return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.UNAUTHORIZED, request);
     }
 
     @ExceptionHandler({OwlRuntimeException.class })
@@ -75,7 +93,7 @@
             final MethodArgumentNotValidException ex, final HttpHeaders headers,
             final HttpStatus status, final WebRequest request) {
         final String bodyOfResponse = "This should be application specific4";
-        return this.handleExceptionInternal(ex, bodyOfResponse, headers, HttpStatus.OK, request);
+        return this.handleExceptionInternal(ex, bodyOfResponse, headers, HttpStatus.BAD_REQUEST, request);
     }
 
     @Override

--
Gitblit v1.8.0