261020_02_BUG: KKO 템플릿 리스트 조회에 ACT 결과가 없으면 RDY 조회 없이 오류 수정

This commit is contained in:
2026-10-20 12:30:26 +09:00
parent dce0e115ae
commit 7a1501d551
2 changed files with 11 additions and 0 deletions

View File

@@ -72,6 +72,14 @@ public class KkoTemplateApiClient {
if (root == null || !root.isObject() || !root.path("code").isTextual()) {
throw invalidResponse();
}
if ("/template/list".equals(path) && "508".equals(root.path("code").asText())) {
var empty = objectMapper.createObjectNode();
empty.put("totalCount", 0);
empty.put("totalPage", 0);
empty.put("currentPage", 0);
empty.putObject("data").putArray("list");
return empty;
}
if (!"200".equals(root.path("code").asText())) {
throw providerError();
}

View File

@@ -56,6 +56,9 @@ public class KkoTemplateService {
totalPage = Math.max(totalPage, nonNegativeInt(root, "totalPage"));
currentPage = Math.max(currentPage, nonNegativeInt(root, "currentPage"));
}
if (templates.isEmpty()) {
throw BusinessException.notFound("KKO_TEMPLATE_NOT_FOUND", "조회된 알림톡 템플릿이 없습니다.");
}
return new KkoTemplateListResponseDto(totalCount, totalPage, currentPage,
new ArrayList<>(templates.values()));
}