fix(cupang): itemcode 조회 오류를 로그+API+화면에 노출 (원인 진단)
- ItemcodeReader.last_error 추가, _run 실패 시 logger.exception + 메시지 보존 - /api/products/all 응답에 error/count 추가 - products 화면: 결과 0 일 때 조회오류/사유 표시 (그냥 '결과 없음' 대신) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,14 @@
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (data) {
|
||||
all = (data && data.results) || [];
|
||||
if (!all.length) { listBox.innerHTML = '<p class="erp-muted">itemcode_db 결과 없음</p>'; return; }
|
||||
if (!all.length) {
|
||||
var msg = "itemcode_db 결과 없음";
|
||||
if (data && data.error) { msg += " — 조회 오류: " + esc(data.error); }
|
||||
else if (data && !data.enabled && data.reason) { msg += " — " + esc(data.reason); }
|
||||
else { msg += " (테이블이 비었거나 검색 SQL 조건 불일치)"; }
|
||||
listBox.innerHTML = '<p class="erp-muted">' + msg + '</p>';
|
||||
return;
|
||||
}
|
||||
render();
|
||||
})
|
||||
.catch(function () { listBox.innerHTML = '<p class="erp-muted">목록 로드 실패</p>'; });
|
||||
|
||||
Reference in New Issue
Block a user