Skip to content

Commit 5bb8f7b

Browse files
devchankiclaude
andcommitted
debug: 복잡도 분석 dispatch HTTP 응답 상태 로깅 추가
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 74009f6 commit 5bb8f7b

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

handlers/webhooks.js

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,16 +327,24 @@ async function handlePullRequestEvent(payload, env, ctx) {
327327

328328
// 복잡도 분석 디스패치
329329
ctx.waitUntil(
330-
fetch(`${baseUrl}/internal/complexity-analysis`, {
331-
method: "POST",
332-
headers: dispatchHeaders,
333-
body: JSON.stringify({
334-
...commonPayload,
335-
prData: pr,
336-
}),
337-
}).catch((err) =>
338-
console.error(`[dispatch] complexityAnalysis failed: ${err.message}`)
339-
)
330+
(async () => {
331+
try {
332+
const res = await fetch(`${baseUrl}/internal/complexity-analysis`, {
333+
method: "POST",
334+
headers: dispatchHeaders,
335+
body: JSON.stringify({
336+
...commonPayload,
337+
prData: pr,
338+
}),
339+
});
340+
if (!res.ok) {
341+
const text = await res.text().catch(() => "");
342+
console.error(`[dispatch] complexityAnalysis HTTP ${res.status}: ${text}`);
343+
}
344+
} catch (err) {
345+
console.error(`[dispatch] complexityAnalysis failed: ${err.message}`);
346+
}
347+
})()
340348
);
341349

342350
console.log(`[handlePullRequestEvent] Dispatched 3 AI handlers for PR #${prNumber}`);

0 commit comments

Comments
 (0)