Improve error handling during group sends
This commit is contained in:
parent
f0a3735ca2
commit
991580a1ed
58 changed files with 299 additions and 324 deletions
53
ts/groups.ts
53
ts/groups.ts
|
@ -453,7 +453,10 @@ async function uploadAvatar(
|
|||
key,
|
||||
};
|
||||
} catch (error) {
|
||||
log.warn(`uploadAvatar/${logId} Failed to upload avatar`, error.stack);
|
||||
log.warn(
|
||||
`uploadAvatar/${logId} Failed to upload avatar`,
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
@ -2391,7 +2394,7 @@ export async function initiateMigrationToGroupV2(
|
|||
} catch (error) {
|
||||
log.error(
|
||||
`initiateMigrationToGroupV2/${logId}: Error creating group:`,
|
||||
error.stack
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
|
||||
throw error;
|
||||
|
@ -2473,7 +2476,7 @@ export async function waitThenRespondToGroupV2Migration(
|
|||
} catch (error) {
|
||||
log.error(
|
||||
`waitThenRespondToGroupV2Migration/${conversation.idForLogging()}: respondToGroupV2Migration failure:`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -2946,7 +2949,7 @@ export async function waitThenMaybeUpdateGroup(
|
|||
} catch (error) {
|
||||
log.error(
|
||||
`waitThenMaybeUpdateGroup/${conversation.idForLogging()}: maybeUpdateGroup failure:`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -2984,7 +2987,7 @@ export async function maybeUpdateGroup(
|
|||
} catch (error) {
|
||||
log.error(
|
||||
`maybeUpdateGroup/${logId}: Failed to update group:`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
|
@ -3910,7 +3913,7 @@ async function integrateGroupChanges({
|
|||
} catch (error) {
|
||||
log.error(
|
||||
`integrateGroupChanges/${logId}: Failed to apply change log, continuing to apply remaining change logs.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -5287,7 +5290,7 @@ export async function applyNewAvatar(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`applyNewAvatar/${logId} Failed to handle avatar, clearing it`,
|
||||
error.stack
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
if (result.avatar && result.avatar.path) {
|
||||
await window.Signal.Migrations.deleteAttachmentData(result.avatar.path);
|
||||
|
@ -5622,7 +5625,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt sourceUuid.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -5677,7 +5680,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt deleteMembers.deletedUserId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -5711,7 +5714,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt modifyMemberRole.userId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -5844,7 +5847,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt deletePendingMembers.deletedUserId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -6022,7 +6025,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt modifyTitle.title`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -6049,7 +6052,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt modifyDisappearingMessagesTimer.timer`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -6152,7 +6155,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt deletePendingApproval.deletedUserId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -6190,7 +6193,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt promoteAdminApproval.userId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -6232,7 +6235,7 @@ function decryptGroupChange(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupChange/${logId}: Unable to decrypt modifyDescription.descriptionBytes`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -6365,7 +6368,7 @@ function decryptGroupState(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupState/${logId}: Unable to decrypt title. Clearing it.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -6388,7 +6391,7 @@ function decryptGroupState(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupState/${logId}: Unable to decrypt disappearing message timer. Clearing it.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -6472,7 +6475,7 @@ function decryptGroupState(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptGroupState/${logId}: Unable to decrypt descriptionBytes. Clearing it.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -6537,7 +6540,7 @@ function decryptMember(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMember/${logId}: Unable to decrypt member userid. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
@ -6608,7 +6611,7 @@ function decryptMemberPendingProfileKey(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMemberPendingProfileKey/${logId}: Unable to decrypt pending member addedByUserId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
@ -6648,7 +6651,7 @@ function decryptMemberPendingProfileKey(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMemberPendingProfileKey/${logId}: Unable to decrypt pending member userId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
@ -6673,7 +6676,7 @@ function decryptMemberPendingProfileKey(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMemberPendingProfileKey/${logId}: Unable to decrypt pending member profileKey. Dropping profileKey.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -6735,7 +6738,7 @@ function decryptMemberPendingAdminApproval(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMemberPendingAdminApproval/${logId}: Unable to decrypt pending member userId. Dropping member.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
@ -6760,7 +6763,7 @@ function decryptMemberPendingAdminApproval(
|
|||
} catch (error) {
|
||||
log.warn(
|
||||
`decryptMemberPendingAdminApproval/${logId}: Unable to decrypt profileKey. Dropping profileKey.`,
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue