From 6f028a2140c7ef95bf35df71698629c82a17cb2e Mon Sep 17 00:00:00 2001 From: Jack Frain Date: Wed, 29 May 2024 13:32:56 -0400 Subject: [PATCH] fix(mu): change try catch to .catch in mu worker --- servers/mu/src/domain/clients/worker.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/servers/mu/src/domain/clients/worker.js b/servers/mu/src/domain/clients/worker.js index b3d31cb6a..f2cba80c9 100644 --- a/servers/mu/src/domain/clients/worker.js +++ b/servers/mu/src/domain/clients/worker.js @@ -115,12 +115,10 @@ function processResultsWith ({ dequeue, processResult, logger }) { const result = dequeue() if (result) { logger(`Processing task of type ${result.type}`) - try { - processResult(result) - } catch (e) { + processResult(result).catch((e) => { logger(`Result failed with error ${e}, will not recover`) logger(e) - } + }) } else { await new Promise(resolve => setTimeout(resolve, 100)) }