Skip to content

Commit

Permalink
[HOTFIX] 네이버 OCR 응답값 로깅
Browse files Browse the repository at this point in the history
  • Loading branch information
seokbeom00 committed Nov 11, 2024
1 parent f95de1e commit bec2ca8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.json.JSONArray;
import org.json.JSONObject;
import org.sopt.seonyakServer.global.common.external.naver.dto.OcrBusinessResponse;
Expand All @@ -26,6 +27,7 @@

@Service
@RequiredArgsConstructor
@Slf4j
public class OcrService {
private final OcrConfig ocrConfig;

Expand Down Expand Up @@ -206,6 +208,7 @@ private String extractInferResult(String jsonResponse) {
private String getOcrResponse(String apiUrl, String apiKey, MultipartFile file) throws IOException {

String response = requestNaverOcr(apiUrl, apiKey, file);
log.info("OCR API Response: {}", response);
// 네이버 OCR 실패 응답 처리
String responseResult = extractInferResult(response);
if (responseResult.equals("FAILURE")) {
Expand Down

0 comments on commit bec2ca8

Please sign in to comment.