From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/3] pull: add error context for initial group list call
Date: Fri, 15 Jan 2021 11:48:54 +0100 [thread overview]
Message-ID: <20210115104855.3992674-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20210115104855.3992674-1-f.gruenbichler@proxmox.com>
otherwise the user is confronted with a generic error like "permission
check failed" with no indication that it refers to a request made to the
remote PBS instance..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/client/pull.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/client/pull.rs b/src/client/pull.rs
index f6ef7cde..15514374 100644
--- a/src/client/pull.rs
+++ b/src/client/pull.rs
@@ -570,7 +570,10 @@ pub async fn pull_store(
let path = format!("api2/json/admin/datastore/{}/groups", src_repo.store());
- let mut result = client.get(&path, None).await?;
+ let mut result = client
+ .get(&path, None)
+ .await
+ .map_err(|err| format_err!("Failed to retrieve backup groups from remote - {}", err))?;
let mut list: Vec<GroupListItem> = serde_json::from_value(result["data"].take())?;
--
2.20.1
next prev parent reply other threads:[~2021-01-15 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 10:48 [pbs-devel] [PATCH proxmox-backup 1/3] pull: rustfmt Fabian Grünbichler
2021-01-15 10:48 ` Fabian Grünbichler [this message]
2021-01-18 5:52 ` [pbs-devel] applied: [PATCH proxmox-backup 2/3] pull: add error context for initial group list call Thomas Lamprecht
2021-01-15 10:48 ` [pbs-devel] [PATCH proxmox-backup 3/3] pull: only remove owned groups Fabian Grünbichler
2021-01-18 5:57 ` Thomas Lamprecht
2021-01-18 8:35 ` Fabian Grünbichler
2021-01-18 5:52 ` [pbs-devel] applied: [PATCH proxmox-backup 1/3] pull: rustfmt Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210115104855.3992674-2-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox