forked from kimhyungsik/ax_hub_mcp_tool
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package io.shinhanlife.dat.lib.exception;
|
||||
|
||||
// import io.shinhanlife.glow.core.exception.abstracts.BusinessException; (이 패키지는 현재 버전에 존재하지 않아 주석 처리함)
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dat.lib.exception
|
||||
* @className BizException
|
||||
* @description AX HUB 시스템 처리 Exception
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class BizException extends RuntimeException {
|
||||
|
||||
private Object[] replaceStrings;
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
public BizException(String code) {
|
||||
super("");
|
||||
this.code = code;
|
||||
this.replaceStrings = new Object[]{""};
|
||||
}
|
||||
|
||||
public BizException(String code, Object[] replaceStrings) {
|
||||
super("");
|
||||
this.code = code;
|
||||
this.replaceStrings = replaceStrings;
|
||||
}
|
||||
|
||||
public BizException(String code, String msg) {
|
||||
super("");
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,15 @@ public class MemoListRetrieverUseCaseImpl implements MemoListRetrieverUseCase {
|
||||
MemoListRetrieverHttpResponse httpResponse = memoClient.call(httpRequest, MemoListRetrieverHttpResponse.class);
|
||||
|
||||
MemoListRetrieverResponse response = converter.toResponse(httpResponse);
|
||||
|
||||
// Sparrow NULL_RETURN (널 역참조) 방어 로직
|
||||
if (response == null) {
|
||||
response = new MemoListRetrieverResponse();
|
||||
response.setResultCode("ERROR");
|
||||
response.setResultMessage("HTTP API 응답이 없거나 변환에 실패했습니다.");
|
||||
return response;
|
||||
}
|
||||
|
||||
response.setResultCode("SUCCESS");
|
||||
response.setResultMessage("HTTP API call completed.");
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user