feat: notify admin via Telegram on webhook errors

Send error details to ADMIN_CHAT_ID (optional secret) whenever the
statuspage webhook handler hits an error path. Uses waitUntil() so
the notification never blocks the 200 response.
This commit is contained in:
tiennm99 committed 2026-04-13 22:50:27 +07:00
1 parent 3857c1e16f
commit 62bf203c22
6 files changed
+69 -10

No files matched your search

+4
View File
@@ -55,6 +55,10 @@ npx wrangler secret put BOT_TOKEN
npx wrangler secret put WEBHOOK_SECRET
# Choose a random secret string for the Statuspage webhook URL
npx wrangler secret put ADMIN_CHAT_ID
# (Optional) Your Telegram chat ID — receive webhook error alerts via Telegram
# Use the bot's /info command to find your chat ID
```
### 5. Deploy