제주은행 EAI와 응답 시 데이터부가 없을 경우(API GW 오류 발생), 500으로 리턴되도록 수정
This commit is contained in:
+4
@@ -213,6 +213,10 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport
|
|||||||
|
|
||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
|
|
||||||
|
String apiInternalErrorCode = prop.getProperty("API_INTERNAL_ERROR_CODE", "");
|
||||||
|
if(StringUtils.isNotEmpty(apiInternalErrorCode))
|
||||||
|
response.setStatus(500);
|
||||||
|
|
||||||
byte[] responseBytes = null;
|
byte[] responseBytes = null;
|
||||||
String responseData = "";
|
String responseData = "";
|
||||||
if (RESPONSE_TYPE_ASYNC.equals(responseType)){
|
if (RESPONSE_TYPE_ASYNC.equals(responseType)){
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.eactive.eai.common.exception;
|
package com.eactive.eai.common.exception;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.json.simple.JSONValue;
|
|
||||||
|
|
||||||
import com.eactive.eai.adapter.AdapterGroupVO;
|
import com.eactive.eai.adapter.AdapterGroupVO;
|
||||||
import com.eactive.eai.adapter.AdapterManager;
|
import com.eactive.eai.adapter.AdapterManager;
|
||||||
@@ -60,6 +60,9 @@ public class ExceptionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static EAIMessage handle(EAIMessage eaiMessage) {
|
public static EAIMessage handle(EAIMessage eaiMessage) {
|
||||||
|
Properties prop = eaiMessage.getCallProp();
|
||||||
|
prop.setProperty("API_INTERNAL_ERROR_CODE", eaiMessage.getRspErrCd());
|
||||||
|
|
||||||
String inAdapterGroupName = eaiMessage.getSngSysItfTp();
|
String inAdapterGroupName = eaiMessage.getSngSysItfTp();
|
||||||
AdapterManager manager = AdapterManager.getInstance();
|
AdapterManager manager = AdapterManager.getInstance();
|
||||||
AdapterGroupVO group = manager.getAdapterGroupVO(inAdapterGroupName);
|
AdapterGroupVO group = manager.getAdapterGroupVO(inAdapterGroupName);
|
||||||
|
|||||||
Reference in New Issue
Block a user