From 63c7f9fd525a241286ddd3e2c091fe14113e1c5c Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 22 Mar 2022 13:53:56 -0700 Subject: [PATCH] getProfile errors shouldn't stop group update Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- ts/groups.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ts/groups.ts b/ts/groups.ts index 0b363d342..dfe79077a 100644 --- a/ts/groups.ts +++ b/ts/groups.ts @@ -2734,12 +2734,19 @@ async function updateGroup( const profileFetchQueue = new PQueue({ concurrency: 3, }); - await profileFetchQueue.addAll( - contactsWithoutProfileKey.map(contact => () => { - const active = contact.getActiveProfileFetch(); - return active || contact.getProfiles(); - }) - ); + try { + await profileFetchQueue.addAll( + contactsWithoutProfileKey.map(contact => () => { + const active = contact.getActiveProfileFetch(); + return active || contact.getProfiles(); + }) + ); + } catch (error) { + log.error( + `updateGroup/${logId}: failed to fetch missing profiles`, + Errors.toLogFormat(error) + ); + } } if (changeMessagesToSave.length > 0) {