TemplateAdapterErrorMsgHandler 구현 작업 내역
-인바운드/아웃바운드/내부 오류 발생 시 어댑터별로 프로퍼티에 등록된 템플릿을 사용하여 커스텀 에러 응답 메시지를 생성하는 TemplateAdapterErrorMsgHandler 구현 및 연동 작업. - ExceptionHandler 변경 인바운드 어댑터에 ERR_MSG_HANDLER 프로퍼티가 설정된 경우 우선 실행 - ApiController에서 사용할 수 있는 generateNonStandardInboundErrorResponseMessage 추가, Controller에서도 Adapter가 식별되면 설정된 핸들러에 의해 에러메시지 행성 가능
This commit is contained in:
@@ -671,6 +671,8 @@ public abstract class DefaultProcess extends Process {
|
||||
StandardMessage resStandardMessage = this.resEaiMsg.getStandardMessage();
|
||||
InterfaceMapper mapper = this.resEaiMsg.getMapper();
|
||||
String responseType = mapper.getResponseType(resStandardMessage);
|
||||
|
||||
// apigw내 오류 없이, 표준헤더내 오류설정된 경우 응답 처리
|
||||
if(!STDMessageKeys.RESPONSE_TYPE_CODE_N.equals(responseType)){
|
||||
String inboudnAdapterGroupName = this.callProp.getProperty(HttpClientAdapterServiceKey.ADAPTER_GROUP_NAME);
|
||||
String inboudnAdapterName = this.callProp.getProperty(HttpClientAdapterServiceKey.ADAPTER_NAME);
|
||||
@@ -693,7 +695,7 @@ public abstract class DefaultProcess extends Process {
|
||||
|
||||
AdapterErrorMessageHandler adapterErrorMessageHandler = AdapterErrorMessageHandlerFactory.createHandler(errorResponseHandlerClass);
|
||||
|
||||
Object responseObj = adapterErrorMessageHandler.generateNonStandardErrorResponseMessage(inboudnAdapterGroupName, inboudnAdapterName, this.callProp, this.tgtTranObject, resStandardMessage);
|
||||
Object responseObj = adapterErrorMessageHandler.generateNonStandardErrorResponseMessage(inboudnAdapterGroupName, inboudnAdapterName, this.callProp, this.tgtTranObject, this.resEaiMsg);
|
||||
if(responseObj != null) {
|
||||
resStandardMessage.setBizData(responseObj, inboundAdapterGroupVO.getMessageEncode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user