diff --git a/app/Http/Controllers/Barobill/EaccountController.php b/app/Http/Controllers/Barobill/EaccountController.php index cfcba3b1..52a1d028 100644 --- a/app/Http/Controllers/Barobill/EaccountController.php +++ b/app/Http/Controllers/Barobill/EaccountController.php @@ -316,6 +316,9 @@ public function latestBalances(Request $request): JsonResponse */ public function transactions(Request $request): JsonResponse { + // SOAP API 호출이 여러 건 발생할 수 있으므로 타임아웃 연장 + set_time_limit(120); + try { $startDate = $request->input('startDate', date('Ymd')); $endDate = $request->input('endDate', date('Ymd')); diff --git a/resources/views/barobill/eaccount/index.blade.php b/resources/views/barobill/eaccount/index.blade.php index 6abf649f..6d6ea70a 100644 --- a/resources/views/barobill/eaccount/index.blade.php +++ b/resources/views/barobill/eaccount/index.blade.php @@ -1925,7 +1925,18 @@ className="p-1 text-red-500 hover:bg-red-50 rounded transition-colors" }); const response = await fetch(`${API.transactions}?${params}`); - const data = await response.json(); + if (!response.ok) { + const text = await response.text(); + throw new Error(`서버 응답 오류 (${response.status}): ${text.substring(0, 200)}`); + } + const text = await response.text(); + if (!text) { + throw new Error('서버가 빈 응답을 반환했습니다. (타임아웃 가능성)'); + } + let data; + try { data = JSON.parse(text); } catch (e) { + throw new Error('JSON 파싱 실패: ' + text.substring(0, 200)); + } if (data.success) { setLogs(data.data?.logs || []);