diff --git a/proxmox-backup-client/src/catalog.rs b/proxmox-backup-client/src/catalog.rs index 7173c8ef..473214c3 100644 --- a/proxmox-backup-client/src/catalog.rs +++ b/proxmox-backup-client/src/catalog.rs @@ -65,9 +65,8 @@ async fn dump_catalog(param: Value) -> Result { None => None, Some(key) => { let (key, _created, _fingerprint) = decrypt_key(&key.key, &get_encryption_key_password) - .map_err(|err| { + .inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; let crypt_config = CryptConfig::new(key)?; Some(Arc::new(crypt_config)) @@ -204,9 +203,8 @@ async fn catalog_shell(param: Value) -> Result<(), Error> { None => None, Some(key) => { let (key, _created, _fingerprint) = decrypt_key(&key.key, &get_encryption_key_password) - .map_err(|err| { + .inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; let crypt_config = CryptConfig::new(key)?; Some(Arc::new(crypt_config)) diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index 580feb62..c9be952a 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -1543,9 +1543,8 @@ async fn restore( None => None, Some(ref key) => { let (key, _, _) = - decrypt_key(&key.key, &get_encryption_key_password).map_err(|err| { + decrypt_key(&key.key, &get_encryption_key_password).inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; Some(Arc::new(CryptConfig::new(key)?)) } diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs index 0a60d69f..bbfc6eb4 100644 --- a/proxmox-file-restore/src/main.rs +++ b/proxmox-file-restore/src/main.rs @@ -291,9 +291,8 @@ async fn list( None => None, Some(ref key) => { let (key, _, _) = - decrypt_key(&key.key, &get_encryption_key_password).map_err(|err| { + decrypt_key(&key.key, &get_encryption_key_password).inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; Some(Arc::new(CryptConfig::new(key)?)) } @@ -455,9 +454,8 @@ async fn extract( None => None, Some(ref key) => { let (key, _, _) = - decrypt_key(&key.key, &get_encryption_key_password).map_err(|err| { + decrypt_key(&key.key, &get_encryption_key_password).inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; Some(Arc::new(CryptConfig::new(key)?)) } diff --git a/src/bin/proxmox_backup_debug/diff.rs b/src/bin/proxmox_backup_debug/diff.rs index dcd351d9..02389d0e 100644 --- a/src/bin/proxmox_backup_debug/diff.rs +++ b/src/bin/proxmox_backup_debug/diff.rs @@ -122,9 +122,8 @@ async fn diff_archive_cmd( None => None, Some(key) => { let (key, _created, _fingerprint) = decrypt_key(&key.key, &get_encryption_key_password) - .map_err(|err| { + .inspect_err(|_err| { log::error!("{}", format_key_source(&key.source, "encryption")); - err })?; let crypt_config = CryptConfig::new(key)?; Some(Arc::new(crypt_config))