fix: catch exception when raised in last dljob

this is for attachment download. We don't want  to throw an uncaught
exception in the catch block
pull/2410/head
Audric Ackermann 3 years ago
parent 67153bbb07
commit 9e3b76dd28

@ -245,7 +245,7 @@ async function _runJob(job: any) {
try {
_addAttachmentToMessage(found, _markAttachmentAsError(attachment), { type, index });
} catch (e) {
// just swallow any exceptions here, as it would be an unhandled one
// just swallow this exception. We don't want to throw it from the catch block here as this will endup being a Uncaught global promise
}
await _finishJob(found || null, id);

Loading…
Cancel
Save