Skip to content

Commit def5396

Browse files
committed
Make the withheld reason part of the error message
1 parent 1b2ba33 commit def5396

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

crates/matrix-sdk-crypto/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub enum MegolmError {
8888

8989
/// Decryption failed because we're missing the room key that was to encrypt
9090
/// the event.
91-
#[error("Can't find the room key to decrypt the event")]
91+
#[error("Can't find the room key to decrypt the event, withheld code: {0:?}")]
9292
MissingRoomKey(Option<WithheldCode>),
9393

9494
/// Decryption failed because of a mismatch between the identity keys of the

crates/matrix-sdk-crypto/src/machine.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,6 @@ impl OlmMachine {
13601360
_ => {}
13611361
}
13621362

1363-
// TODO: log the withheld reason if we have one.
13641363
warn!("Failed to decrypt a room event: {e}");
13651364
}
13661365

0 commit comments

Comments
 (0)