You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-19 10:22:30 +03:00
Improve decryption error messages
Attempt to make the decryption errors less obscure
This commit is contained in:
@@ -1220,7 +1220,9 @@ Crypto.prototype._getRoomDecryptor = function(roomId, algorithm) {
|
||||
|
||||
var AlgClass = algorithms.DECRYPTION_CLASSES[algorithm];
|
||||
if (!AlgClass) {
|
||||
throw new algorithms.DecryptionError("Unable to decrypt " + algorithm);
|
||||
throw new algorithms.DecryptionError(
|
||||
'Unknown encryption algorithm "' + algorithm + '".'
|
||||
);
|
||||
}
|
||||
alg = new AlgClass({
|
||||
userId: this._userId,
|
||||
|
||||
Reference in New Issue
Block a user