From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Cc: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] applied: [PATCH datacenter-manager] server: connection: improve error messages for remotes
Date: Mon, 14 Apr 2025 16:53:13 +0200 [thread overview]
Message-ID: <742a6u3t5gkmikbafymq65ch4ezpnmcg6cydrb3ai5e64uyn4s@fohmrcrut5j4> (raw)
In-Reply-To: <20250411140557.1494389-1-d.csapak@proxmox.com>
applied, thanks
On Fri, Apr 11, 2025 at 04:05:57PM +0200, Dominik Csapak wrote:
> by including either the original error, or a notice that it timed out.
> That way, when we return the error over the API, the user can maybe
> better see what the actual problem is.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> server/src/connection.rs | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/server/src/connection.rs b/server/src/connection.rs
> index 1688fb3..201d65b 100644
> --- a/server/src/connection.rs
> +++ b/server/src/connection.rs
> @@ -747,13 +747,17 @@ macro_rules! try_request {
>
> if let Some(err) = last_err {
> log::error!("API client error (giving up) - {err:?}");
> + Err(proxmox_client::Error::Client(err))
> } else if timed_out {
> log::error!("API client timed out, no remotes reachable, giving up");
> + Err(proxmox_client::Error::Other(
> + "failed to perform API request: timed out",
> + ))
> + } else {
> + Err(proxmox_client::Error::Other(
> + "failed to perform API request: unknown error",
> + ))
> }
> -
> - Err(proxmox_client::Error::Other(
> - "failed to perform API request",
> - ))
> })
> };
> }
> --
> 2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
prev parent reply other threads:[~2025-04-14 14:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 14:05 [pdm-devel] " Dominik Csapak
2025-04-14 14:53 ` Wolfgang Bumiller [this message]
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=742a6u3t5gkmikbafymq65ch4ezpnmcg6cydrb3ai5e64uyn4s@fohmrcrut5j4 \
--to=w.bumiller@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pdm-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal