Skip to content

Commit

Permalink
Ensure that we capture sender even if thrown error is falsey
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Feb 14, 2019
1 parent 291e8d8 commit 28f96fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/modules/metadata/SecretSessionCipher.js
Expand Up @@ -416,6 +416,11 @@ SecretSessionCipher.prototype = {
content: await _decryptWithUnidentifiedSenderMessage(content),
};
} catch (error) {
if (!error) {
// eslint-disable-next-line no-ex-assign
error = new Error('Decryption error was falsey!');
}

error.sender = address;

throw error;
Expand Down

0 comments on commit 28f96fe

Please sign in to comment.