Debug Panel
When Integration Goes Sideways
Open the Debug Panel from your dashboard to see the most recent HTTP interactions for the three widget endpoints. Comes with an error-code lookup table, one-click cURL copy, and an "AI rescue" prompt template ready to paste into ChatGPT. Built for engineers and AI alike.
為什麼需要 Debug 面板?
Widget 嵌入後若沒反應,工程師會問三件事:...
在哪裡 / 怎麼打開
登入客戶後台 → 進入您要 debug 的 Web Bot → ...
面板長相
打開後會看到三大區塊:...
Token
web_xxxxxxxx最後一次成功 pingchungtair.com · 3 分鐘前
⚡ 立即測試連線📋 複製整份 Debug
📡 最近的請求(每種 endpoint 各 1 筆)
14:32:18POST/api/widget/message200 ✅
Originhttps://chungtair.com
IP1.2.3.4
Request
{"token":"web_abc","message":"hi"}Response
{"success":true,"reply":"您好!..."}耗時1.2 s
📋 複製為 cURL📋 複製為文字
14:32:15POST/api/widget/ping200 ✅
14:32:15GET/api/widget/config200 ✅
「立即測試連線」流程
- 按下「⚡ 立即測試連線」
- 後端開始 35 秒監聽窗口...
三種複製按鈕怎麼選
| Button | Output Format | Where to Paste |
|---|---|---|
| 📋 Copy as cURL | Single request → curl command | Engineer's terminal, ready to replay |
| 📋 Copy as text | Single request, all fields plain text | ChatGPT / Claude — ask AI to interpret |
| 📋 Copy full debug | Token + last ping + all 3 requests | Single paste for engineers / AI, most complete |
錯誤碼對照表
| Status | Message | Endpoint | Likely Cause | Fix |
|---|---|---|---|---|
200 | success | config/ping/message | Everything OK | None |
200 | Service paused | message | Bot disabled (enabled=false) in dashboard | Enable the bot in your dashboard |
400 | bad json | ping | Request body is not valid JSON | Check if widget.js was tampered with / verify Content-Type |
400 | reply: "" | message | Message empty, not a string, or > 300 chars | Keep messages 1-300 characters |
404 | invalid token | config/ping | Widget token does not exist or wrong format | Token must be 32 lowercase hex chars; the copy-paste must not be truncated |
404 | Widget invalid or deleted | message | Same as invalid token, or the bot was deleted | Re-copy the embed snippet from the dashboard |
429 | Rate limited | message | > 20 messages per minute from one IP | Visitor spamming or under attack; check traffic / block the IP |
429 | Rate limited | ping | > 30 pings per minute from one IP | Usually a visitor rapidly refreshing; normal usage won't hit this |
500 | System error, please retry | message | AI layer error (OpenAI / RAG / handoff write) | Retry shortly; if persistent, check dashboard alerts / contact support |
把 log 餵給 AI 求救
Debug 面板的「📋 複製整份 Debug」按鈕產生的純文字格式特別為 AI 設計...
我把忠台AI客服的 Widget 嵌入代碼貼到我的網站...