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:
2026-04-13 22:50:27 +07:00
parent 3857c1e16f
commit 62bf203c22
6 changed files with 69 additions and 10 deletions

View File

@@ -41,4 +41,5 @@
// Secrets (set via `wrangler secret put`):
// BOT_TOKEN - Telegram bot token
// WEBHOOK_SECRET - Statuspage webhook URL secret
// ADMIN_CHAT_ID - Telegram chat ID to receive error notifications
}