chore(telegram): suppress handled empty-text retry logs

This commit is contained in:
Glucksberg
2026-02-24 05:49:19 +00:00
committed by Ayaan Zaidi
parent 51b3e23680
commit 566a8e7137

View File

@@ -582,7 +582,10 @@ async function sendTelegramText(
const res = await withTelegramApiErrorLogging({
operation: "sendMessage",
runtime,
shouldLog: (err) => !PARSE_ERR_RE.test(formatErrorMessage(err)),
shouldLog: (err) => {
const errText = formatErrorMessage(err);
return !PARSE_ERR_RE.test(errText) && !EMPTY_TEXT_ERR_RE.test(errText);
},
fn: () =>
bot.api.sendMessage(chatId, htmlText, {
parse_mode: "HTML",