mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:34:58 +00:00
fix: narrow Telegram failed-after retry match
This commit is contained in:
@@ -33,8 +33,8 @@ const RECOVERABLE_ERROR_NAMES = new Set([
|
||||
]);
|
||||
|
||||
const ALWAYS_RECOVERABLE_MESSAGES = new Set(["fetch failed", "typeerror: fetch failed"]);
|
||||
const GRAMMY_NETWORK_REQUEST_FAILED_RE =
|
||||
/^network request(?:\s+for\s+["']?[^"']+["']?)?\s+failed(?:\s+after\b.*)?[!.]?$/i;
|
||||
const GRAMMY_NETWORK_REQUEST_FAILED_AFTER_RE =
|
||||
/^network request(?:\s+for\s+["']?[^"']+["']?)?\s+failed\s+after\b.*[!.]?$/i;
|
||||
|
||||
const RECOVERABLE_MESSAGE_SNIPPETS = [
|
||||
"undici",
|
||||
@@ -108,7 +108,7 @@ export function isRecoverableTelegramNetworkError(
|
||||
if (message && ALWAYS_RECOVERABLE_MESSAGES.has(message)) {
|
||||
return true;
|
||||
}
|
||||
if (message && GRAMMY_NETWORK_REQUEST_FAILED_RE.test(message)) {
|
||||
if (message && GRAMMY_NETWORK_REQUEST_FAILED_AFTER_RE.test(message)) {
|
||||
return true;
|
||||
}
|
||||
if (allowMessageMatch && message) {
|
||||
|
||||
Reference in New Issue
Block a user