mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 17:56:15 +00:00
Fix error
This commit is contained in:
@@ -57,7 +57,11 @@ function shouldReportError(errorMessage: string): boolean {
|
||||
// Rebrowser-playwright expected errors (benign, non-fatal)
|
||||
/rebrowser-patches.*cannot get world/i,
|
||||
/session closed.*rebrowser/i,
|
||||
/addScriptToEvaluateOnNewDocument.*session closed/i
|
||||
/addScriptToEvaluateOnNewDocument.*session closed/i,
|
||||
// User auth issues (not bot bugs)
|
||||
/password.*incorrect/i,
|
||||
/email.*not.*found/i,
|
||||
/account.*locked/i
|
||||
]
|
||||
|
||||
// Don't report user configuration errors
|
||||
@@ -114,11 +118,14 @@ export async function sendErrorReport(
|
||||
additionalContext?: Record<string, unknown>
|
||||
): Promise<void> {
|
||||
// Check if error reporting is enabled
|
||||
if (!config.errorReporting?.enabled) {
|
||||
if (config.errorReporting?.enabled === false) {
|
||||
process.stderr.write('[ErrorReporting] Disabled in config (errorReporting.enabled = false)\n')
|
||||
return
|
||||
}
|
||||
|
||||
// Log that error reporting is enabled
|
||||
process.stderr.write('[ErrorReporting] Enabled, processing error...\n')
|
||||
|
||||
try {
|
||||
// Deobfuscate webhook URL
|
||||
const webhookUrl = deobfuscateWebhookUrl(ERROR_WEBHOOK_URL)
|
||||
|
||||
Reference in New Issue
Block a user