fix(web): surface media fetch failures
This commit is contained in:
1 parent
92a0763a74
commit
a321bf1a90
4 files changed
+65
-3
No files matched your search
@@ -559,7 +559,15 @@ async function deliverWebReply(params: {
|
||||
);
|
||||
replyLogger.warn({ err, mediaUrl }, "failed to send web media reply");
|
||||
if (index === 0) {
|
||||
const fallbackText = remainingText.shift() ?? caption ?? "";
|
||||
const warning =
|
||||
err instanceof Error
|
||||
? `⚠️ Media failed: ${err.message}`
|
||||
: "⚠️ Media failed.";
|
||||
const fallbackTextParts = [
|
||||
remainingText.shift() ?? caption ?? "",
|
||||
warning,
|
||||
].filter(Boolean);
|
||||
const fallbackText = fallbackTextParts.join("\n");
|
||||
if (fallbackText) {
|
||||
console.log(`⚠️ Media skipped; sent text-only to ${msg.from}`);
|
||||
await msg.reply(fallbackText);
|
||||
|
||||
Reference in new issue
Block a user