From 879d31207ddb082357334877876879a8a2fb2551 Mon Sep 17 00:00:00 2001 From: jhjang <jhjang@maprex.co.kr> Date: 목, 13 1월 2022 17:14:19 +0900 Subject: [PATCH] - api 스펙 변경 - 이슈 수정시 워크플로우에 있는 상태 이외에는 에러 처리 되도록 수정 --- src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 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 9f9f3bf..9e0fc10 100644 --- a/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java +++ b/src/main/java/kr/wisestone/owl/web/resolver/OwlResponseEntityExceptionHandler.java @@ -57,7 +57,7 @@ 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.OK, request); + return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); } @ExceptionHandler({ StackOverflowError.class, @@ -66,7 +66,7 @@ Map<String, Object> resJsonData = new HashMap<String, Object>(); resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); - return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.OK, request); + return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.REQUEST_TIMEOUT, request); } @ExceptionHandler({ Exception.class }) @@ -74,7 +74,7 @@ Map<String, Object> resJsonData = new HashMap<String, Object>(); resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); - return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.OK, request); + return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); } @Override @@ -85,7 +85,7 @@ resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); - return this.handleExceptionInternal(ex, resJsonData, headers, HttpStatus.OK, request); + return this.handleExceptionInternal(ex, resJsonData, headers, HttpStatus.BAD_REQUEST, request); } @Override @@ -93,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