diff --git a/libraries/helpers/src/utils/concurrency.service.ts b/libraries/helpers/src/utils/concurrency.service.ts index c23f61e1..bd35f469 100644 --- a/libraries/helpers/src/utils/concurrency.service.ts +++ b/libraries/helpers/src/utils/concurrency.service.ts @@ -31,7 +31,13 @@ export const concurrency = async ( await timer(300000); res(true as T); }), - func(), + new Promise(async (res) => { + try { + return res(await func()); + } catch (err) { + res(err as T); + } + }), ]); } );