From 054518f4fc4eee8961aecb5d910b2875cb460adb Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Fri, 13 Mar 2026 20:05:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20loadNotifications()=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=EB=82=B4=EC=84=B1=20=EA=B0=95=ED=99=94=20-=20r.ok=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 배포 시 컨테이너 재시작으로 인한 502 응답이 JSON 파싱 실패를 일으키던 문제 방지. 에러 메시지도 "잠시 후 다시 시도해주세요"로 변경. Co-Authored-By: Claude Opus 4.6 --- gateway/html/shared/notification-bell.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gateway/html/shared/notification-bell.js b/gateway/html/shared/notification-bell.js index ea4129a..2967653 100644 --- a/gateway/html/shared/notification-bell.js +++ b/gateway/html/shared/notification-bell.js @@ -174,7 +174,10 @@ list.innerHTML = '
로딩 중...
'; _authFetch(API_BASE + '/unread') - .then(function (r) { return r.json(); }) + .then(function (r) { + if (!r.ok) throw new Error(r.status); + return r.json(); + }) .then(function (data) { if (!data.success || !data.data || data.data.length === 0) { list.innerHTML = '
새 알림이 없습니다
'; @@ -217,7 +220,7 @@ }); }) .catch(function () { - list.innerHTML = '
알림을 불러올 수 없습니다
'; + list.innerHTML = '
잠시 후 다시 시도해주세요
'; }); }