diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index fa647ffd2c..1f21687d34 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -4645,7 +4645,11 @@ export class ConversationModel extends window.Backbone onChangeProfileKey(): void { if (isDirectConversation(this.attributes)) { - void this.getProfiles(); + drop( + this.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ); } } diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 9d7064fe75..75ff28cee3 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -1048,7 +1048,11 @@ export class MessageModel extends window.Backbone.Model { switch (error.name) { case 'OutgoingIdentityKeyError': { if (conversation) { - promises.push(conversation.getProfiles()); + promises.push( + conversation.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ); } break; } diff --git a/ts/routineProfileRefresh.ts b/ts/routineProfileRefresh.ts index c9e5c36a00..5943fdeb42 100644 --- a/ts/routineProfileRefresh.ts +++ b/ts/routineProfileRefresh.ts @@ -142,10 +142,17 @@ export async function routineProfileRefresh({ ); successCount += 1; } catch (err) { - log.error( - `${logId}: refreshed profile for ${conversation.idForLogging()}`, - Errors.toLogFormat(err) - ); + if ('code' in err) { + log.warn( + `${logId}: refreshed profile for ${conversation.idForLogging()},`, + `got error code ${err.code}` + ); + } else { + log.error( + `${logId}: refreshed profile for ${conversation.idForLogging()}`, + Errors.toLogFormat(err) + ); + } } } diff --git a/ts/services/storage.ts b/ts/services/storage.ts index dbd440351b..4a47dc6aee 100644 --- a/ts/services/storage.ts +++ b/ts/services/storage.ts @@ -1601,7 +1601,13 @@ async function processRemoteRecords( ); // Intentionally not awaiting - needProfileFetch.map(convo => drop(convo.getProfiles())); + needProfileFetch.map(convo => + drop( + convo.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ) + ); // Collect full map of previously and currently unknown records const unknownRecords: Map = new Map(); diff --git a/ts/services/storageRecordOps.ts b/ts/services/storageRecordOps.ts index 1f4625ae2b..630705e875 100644 --- a/ts/services/storageRecordOps.ts +++ b/ts/services/storageRecordOps.ts @@ -1064,7 +1064,11 @@ export async function mergeContactRecord( ) { // Local name doesn't match remote name, fetch profile if (localName) { - void conversation.getProfiles(); + drop( + conversation.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ); details.push('refreshing profile'); } else { conversation.set({ diff --git a/ts/shims/contactVerification.ts b/ts/shims/contactVerification.ts index eb7857006a..551c28b4bb 100644 --- a/ts/shims/contactVerification.ts +++ b/ts/shims/contactVerification.ts @@ -11,6 +11,8 @@ export async function toggleVerification(id: string): Promise { export async function reloadProfiles(id: string): Promise { const contact = window.getConversations().get(id); if (contact) { - await contact.getProfiles(); + await contact.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }); } } diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index ee422bb5a2..a342d56399 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -2741,7 +2741,11 @@ function getProfilesForConversation(conversationId: string): NoopActionType { throw new Error('getProfilesForConversation: no conversation found'); } - void conversation.getProfiles(); + drop( + conversation.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ); return { type: 'NOOP', @@ -2765,7 +2769,11 @@ function conversationStoppedByMissingVerification(payload: { } // Intentionally not awaiting here - void conversation.getProfiles(); + drop( + conversation.getProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }) + ); }); return { @@ -4274,7 +4282,9 @@ function onConversationOpened( conversation.throttledGetProfiles !== undefined, 'Conversation model should be initialized' ); - await conversation.throttledGetProfiles(); + await conversation.throttledGetProfiles().catch(() => { + /* nothing to do here; logging already happened */ + }); } drop(conversation.updateVerified());