bindings: Even more precise errors for the QR code login

This commit is contained in:
Damir Jelić
2024-05-29 13:02:59 +02:00
parent ab08f5e095
commit 1380af4f00

View File

@@ -112,12 +112,12 @@ impl From<qrcode::QRCodeLoginError> for HumanQrLoginError {
}
QRCodeLoginError::SecureChannel(e) => match e {
SecureChannelError::Utf8(_)
| SecureChannelError::Ecies(_)
| SecureChannelError::MessageDecode(_)
| SecureChannelError::Json(_)
| SecureChannelError::SecureChannelMessage { .. }
| SecureChannelError::InvalidCheckCode
| SecureChannelError::RendezvousChannel(_) => HumanQrLoginError::Unknown,
SecureChannelError::SecureChannelMessage { .. }
| SecureChannelError::Ecies(_)
| SecureChannelError::InvalidCheckCode => HumanQrLoginError::ConnectionInsecure,
SecureChannelError::InvalidIntent => HumanQrLoginError::OtherDeviceNotSignedIn,
},