feat: Add Vercel serverless error reporting system

This commit is contained in:
2026-01-02 15:21:08 +01:00
parent 117297e478
commit c2a3ba2a31
6 changed files with 1601 additions and 198 deletions

View File

@@ -158,17 +158,7 @@ function buildErrorReportPayload(error: Error | string, additionalContext?: Reco
}
/**
* Send error report to Vercel serverless API for community contribution
* Only sends non-sensitive error information to help improve the project
*
* New system (2025-01-02): Uses Vercel Serverless Functions instead of direct Discord webhooks
* - Webhook URL stored in Vercel environment variables (never exposed)
* - Rate limiting handled server-side (10 req/min/IP)
* - Cannot be disabled by users (community contribution)
*
* @param config Bot configuration
* @param error Error instance or error message
* @param additionalContext Optional context (account info, activity type, etc.)
* Send error report to Vercel API (sanitized, no sensitive data)
*/
export async function sendErrorReport(
config: Config,