From 5bb8f7b7e8561fd152789a4a7cf429beec167e4a Mon Sep 17 00:00:00 2001 From: chanki Date: Fri, 17 Apr 2026 23:35:33 +0900 Subject: [PATCH] =?UTF-8?q?debug:=20=EB=B3=B5=EC=9E=A1=EB=8F=84=20?= =?UTF-8?q?=EB=B6=84=EC=84=9D=20dispatch=20HTTP=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=A1=9C=EA=B9=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- handlers/webhooks.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/handlers/webhooks.js b/handlers/webhooks.js index ca44525..df65a4f 100644 --- a/handlers/webhooks.js +++ b/handlers/webhooks.js @@ -327,16 +327,24 @@ async function handlePullRequestEvent(payload, env, ctx) { // 복잡도 분석 디스패치 ctx.waitUntil( - fetch(`${baseUrl}/internal/complexity-analysis`, { - method: "POST", - headers: dispatchHeaders, - body: JSON.stringify({ - ...commonPayload, - prData: pr, - }), - }).catch((err) => - console.error(`[dispatch] complexityAnalysis failed: ${err.message}`) - ) + (async () => { + try { + const res = await fetch(`${baseUrl}/internal/complexity-analysis`, { + method: "POST", + headers: dispatchHeaders, + body: JSON.stringify({ + ...commonPayload, + prData: pr, + }), + }); + if (!res.ok) { + const text = await res.text().catch(() => ""); + console.error(`[dispatch] complexityAnalysis HTTP ${res.status}: ${text}`); + } + } catch (err) { + console.error(`[dispatch] complexityAnalysis failed: ${err.message}`); + } + })() ); console.log(`[handlePullRequestEvent] Dispatched 3 AI handlers for PR #${prNumber}`);