livekit-client 1.13.1 → 1.13.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1118,7 +1118,7 @@ class FrameCryptor extends BaseFrameCryptor {
1118
1118
  } catch (error) {
1119
1119
  if (error instanceof CryptorError && error.reason === CryptorErrorReason.InvalidKey) {
1120
1120
  if (this.keys.hasValidKey) {
1121
- this.emit(CryptorEvent.Error, new CryptorError("invalid key for participant ".concat(this.participantIdentity), CryptorErrorReason.InvalidKey));
1121
+ this.emit(CryptorEvent.Error, error);
1122
1122
  this.keys.decryptionFailure();
1123
1123
  }
1124
1124
  } else {
@@ -1210,7 +1210,7 @@ class FrameCryptor extends BaseFrameCryptor {
1210
1210
  throw new CryptorError("valid key missing for participant ".concat(this.participantIdentity), CryptorErrorReason.InvalidKey);
1211
1211
  }
1212
1212
  } else {
1213
- throw new CryptorError('Decryption failed, most likely because of an invalid key', CryptorErrorReason.InvalidKey);
1213
+ throw new CryptorError("Decryption failed: ".concat(error.message), CryptorErrorReason.InvalidKey);
1214
1214
  }
1215
1215
  }
1216
1216
  });