public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 2/3] api: remote shell: improve error message
Date: Thu, 11 Dec 2025 14:07:04 +0100	[thread overview]
Message-ID: <20251211130710.2071983-3-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20251211130710.2071983-1-f.gruenbichler@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 server/src/api/remote_shell.rs | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/server/src/api/remote_shell.rs b/server/src/api/remote_shell.rs
index d5e43e9..5207095 100644
--- a/server/src/api/remote_shell.rs
+++ b/server/src/api/remote_shell.rs
@@ -1,5 +1,5 @@
 use anyhow::{bail, format_err, Error};
-use futures::{FutureExt, TryFutureExt};
+use futures::FutureExt;
 use http::{
     header::{SEC_WEBSOCKET_KEY, SEC_WEBSOCKET_VERSION, UPGRADE},
     request::Parts,
@@ -160,12 +160,9 @@ fn upgrade_to_websocket(
 
         proxmox_rest_server::spawn_internal_task(async move {
             let incoming_ws: Upgraded =
-                match hyper::upgrade::on(Request::from_parts(parts, req_body))
-                    .map_err(Error::from)
-                    .await
-                {
+                match hyper::upgrade::on(Request::from_parts(parts, req_body)).await {
                     Ok(upgraded) => upgraded,
-                    _ => bail!("error"),
+                    Err(err) => bail!("failed to process incoming Websocket upgrade: {err}"),
                 };
 
             let (remotes, _digest) = pdm_config::remotes::config()?;
-- 
2.47.3



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel

  parent reply	other threads:[~2025-12-11 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11 13:07 [pdm-devel] [PATCH datacenter-manager 0/3] improve node shell Fabian Grünbichler
2025-12-11 13:07 ` [pdm-devel] [PATCH datacenter-manager 1/3] api: remote shell: do not rely on first node being reachable Fabian Grünbichler
2025-12-11 13:07 ` Fabian Grünbichler [this message]
2025-12-11 13:07 ` [pdm-devel] [PATCH datacenter-manager 3/3] api: remote shell: make websocket proxy a worker task Fabian Grünbichler

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=20251211130710.2071983-3-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@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