]> git.proxmox.com Git - proxmox-backup.git/commitdiff
client: change anyhow Error display representation
authorChristian Ebner <c.ebner@proxmox.com>
Sat, 25 Nov 2023 10:13:32 +0000 (11:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 25 Nov 2023 15:05:09 +0000 (16:05 +0100)
Improve error message output by showing the full Error context, using
the alternate selector '{:#}" [0].
Without this, only the outermost context is displayed, which in case
of pxar extraction errors is mostly not enough to find the underlying
issue.

[0] https://docs.rs/anyhow/1.0.69/anyhow/struct.Error.html#display-representations

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
proxmox-backup-client/src/main.rs

index 1a13291ae6fe8cc279fc6d9c0280f968f3b33c80..9b680f62e0b09b410f9159a8cd1ab4c6f4f17b90 100644 (file)
@@ -1453,7 +1453,7 @@ async fn restore(
                 },
                 options,
             )
-            .map_err(|err| format_err!("error extracting archive - {}", err))?;
+            .map_err(|err| format_err!("error extracting archive - {:#}", err))?;
         } else {
             let mut writer = std::fs::OpenOptions::new()
                 .write(true)