[BUG] downloadMediaMessage not requesting reupload
Author: matheusb-compCreated Aug 11, 2026Updated Sep 27, 2026
Labelsbug
Since Axios was removed (PR #1666), media URLs that fail with "410 Gone" no longer call the ctx.reuploadRequest().
The code here checks for the key status on the error variable.
However, if the request fails on the getHttpStream method here it throws a Boom instance.
And this object does not have a key status. It should check for output.statusCode.
So, back in the catch, the code never reaches the log "sending reupload media request...".
Boom object printed by the logger while trying to download media from a real message (directPath redacted), it includes the stack trace:
{
"type": "Error",
"message": "Failed to fetch stream from https://mmg.whatsapp.net/v/<directPath>",
"stack": "Error: Failed to fetch stream from https://mmg.whatsapp.net/v/<directPath>\n at getHttpStream (file:///app/node_modules/baileys/lib/Utils/messages-media.js:304:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async downloadEncryptedContent (file:///app/node_modules/baileys/lib/Utils/messages-media.js:461:21)\n at async downloadMsg (file:///app/node_modules/baileys/lib/Utils/messages.js:869:24)\n at async downloadMediaMessage (file:///app/node_modules/baileys/lib/Utils/messages.js:834:20)\n at async WorkerService.downloadMedia (/app/cloud/worker/worker.service.js:486:24)\n at async WorkerController.downloadMedia (/app/cloud/worker/worker.controller.js:78:40)\n at async WorkerController.handleMonolithCommand (/app/cloud/worker/worker.controller.js:33:24)\n at async /app/node_modules/@nestjs/microservices/context/rpc-proxy.js:11:32\n at async /app/node_modules/@nestjs/microservices/server/server-redis.js:108:58",
"data": {
"url": "https://mmg.whatsapp.net/v/<directPath>"
},
"isBoom": true,
"isServer": false,
"output": {
"statusCode": 410,
"payload": {
"statusCode": 410,
"error": "Gone",
"message": "Failed to fetch stream from https://mmg.whatsapp.net/v/<directPath>"
},
"headers": {}
}
}Source: WhiskeySockets/Baileys