Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decryption error codes to base.DecryptionError #663

Merged
merged 4 commits into from
Jul 5, 2018

Conversation

@lukebarnard1 lukebarnard1 requested a review from dbkr July 4, 2018 10:56
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise looks fine

@@ -639,6 +642,7 @@ MegolmDecryption.prototype.decryptEvent = async function(event) {
this._requestKeysForEvent(event);
}
throw new base.DecryptionError(
"OLM_UNKNOWN_MESSAGE_INDEX",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error is not necessarily OLM_UNKNOWN_MESSAGE_INDEX here, or at least there is a conditional above that checks for it so I would assume not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IRL, me and @lampholder discussed. We don't especially care about all of the errors thrown by decryptGroupMessage (all of which are plain old Error) so I'll just rename this to OLM_GROUP_MESSAGE_ERROR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I changed my mind, we can still emit OLM_UNKNOWN_MESSAGE_INDEX)

@lukebarnard1 lukebarnard1 requested a review from dbkr July 4, 2018 13:33
@dbkr dbkr merged commit 6e3e8f7 into develop Jul 5, 2018
@t3chguy t3chguy deleted the luke/feature-decryption-error-codes branch May 10, 2022 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants