mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 13:40:55 -04:00
chore(crypto): Log the full error messages when decrypting room events
This commit is contained in:
@@ -85,7 +85,7 @@ pub enum MegolmError {
|
||||
|
||||
/// Decryption failed because we're missing the room key that was to encrypt
|
||||
/// the event.
|
||||
#[error("decryption failed because the room key is missing")]
|
||||
#[error("Can't find the room key to decrypt the event")]
|
||||
MissingRoomKey,
|
||||
|
||||
/// The encrypted megolm message couldn't be decoded.
|
||||
|
||||
@@ -1190,17 +1190,13 @@ impl OlmMachine {
|
||||
match e {
|
||||
MegolmError::MissingRoomKey
|
||||
| MegolmError::Decryption(DecryptionError::UnknownMessageIndex(_, _)) => {
|
||||
// TODO: log the withheld reason if we have one.
|
||||
debug!(
|
||||
"Failed to decrypt a room event, the room key is \
|
||||
missing or has been ratcheted"
|
||||
);
|
||||
self.key_request_machine.create_outgoing_key_request(room_id, &event).await?;
|
||||
}
|
||||
_ => {
|
||||
warn!("Failed to decrypt a room event: {e}");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
// TODO: log the withheld reason if we have one.
|
||||
warn!("Failed to decrypt a room event: {e}");
|
||||
}
|
||||
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user