sendToGroup: Flow errors during key-fetching back up to original sender
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
6f78ad8f76
commit
a67c02686b
|
@ -41,8 +41,11 @@ export async function getKeysForIdentifier(
|
||||||
if (theirUuid) {
|
if (theirUuid) {
|
||||||
await window.textsecure.storage.protocol.archiveAllSessions(theirUuid);
|
await window.textsecure.storage.protocol.archiveAllSessions(theirUuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw new UnregisteredUserError(identifier, error);
|
||||||
}
|
}
|
||||||
throw new UnregisteredUserError(identifier, error);
|
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,18 @@ export async function sendContentMessageToGroup({
|
||||||
sendType,
|
sendType,
|
||||||
timestamp,
|
timestamp,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
|
if (!(error instanceof Error)) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.name.includes('untrusted identity')) {
|
||||||
|
log.error(
|
||||||
|
`sendToGroup/${logId}: Failed with 'untrusted identity' error, re-throwing`
|
||||||
|
);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
log.error(
|
log.error(
|
||||||
`sendToGroup/${logId}: Sender Key send failed, logging, proceeding to normal send`,
|
`sendToGroup/${logId}: Sender Key send failed, logging, proceeding to normal send`,
|
||||||
error && error.stack ? error.stack : error
|
error && error.stack ? error.stack : error
|
||||||
|
@ -1084,6 +1095,7 @@ async function fetchKeysForIdentifiers(
|
||||||
'fetchKeysForIdentifiers: Failed to fetch keys:',
|
'fetchKeysForIdentifiers: Failed to fetch keys:',
|
||||||
error && error.stack ? error.stack : error
|
error && error.stack ? error.stack : error
|
||||||
);
|
);
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue