* [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed
@ 2025-10-24 11:26 Maximiliano Sandoval
2025-10-24 11:26 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors Maximiliano Sandoval
2025-10-24 13:01 ` [pdm-devel] superseded: [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
0 siblings, 2 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-10-24 11:26 UTC (permalink / raw)
To: pdm-devel
The word API was removed in an attempt to make the line as short as
possible while remaining legible. Additionally, there is already a `api`
in the journal since the process reporting this would be
proxmox-datacenter-api[$pid].
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
This was added while debugging an error message which lacked enough context to
debug. The error messages now would look like:
```
client error on request /api2/extjs/cluster/resources, trying another remote - client error (SendRequest)
Caused by:
connection closed before message completed
```
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 2eda452..cf8f788 100644
--- a/server/src/connection.rs
+++ b/server/src/connection.rs
@@ -718,11 +718,13 @@ macro_rules! try_request {
} in $self.try_clients()
{
if let Some(err) = last_err.take() {
- log::error!("API client error, trying another remote - {err:?}");
+ let path = $path_and_query;
+ log::error!("client error on request {path}, trying another remote - {err:?}");
}
if timed_out {
timed_out = false;
- log::error!("API client timed out, trying another remote");
+ let path = $path_and_query;
+ log::error!("client timed out on request {path}, trying another remote");
}
let request = client.$how($method.clone(), $path_and_query, params.as_ref());
@@ -748,10 +750,12 @@ macro_rules! try_request {
}
if let Some(err) = last_err {
- log::error!("API client error (giving up) - {err:?}");
+ let path = $path_and_query;
+ log::error!("client error on request {path}, giving up - {err:?}");
Err(proxmox_client::Error::Client(err))
} else if timed_out {
- log::error!("API client timed out, no remotes reachable, giving up");
+ let path = $path_and_query;
+ log::error!("client timed out on request {path}, no remotes reachable, giving up");
Err(proxmox_client::Error::Other(
"failed to perform API request: timed out",
))
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors
2025-10-24 11:26 [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
@ 2025-10-24 11:26 ` Maximiliano Sandoval
2025-10-24 12:57 ` Maximiliano Sandoval
2025-10-24 13:01 ` [pdm-devel] superseded: [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
1 sibling, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-10-24 11:26 UTC (permalink / raw)
To: pdm-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
server/src/connection.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/src/connection.rs b/server/src/connection.rs
index cf8f788..41469a5 100644
--- a/server/src/connection.rs
+++ b/server/src/connection.rs
@@ -760,6 +760,8 @@ macro_rules! try_request {
"failed to perform API request: timed out",
))
} else {
+ let path = $path_and_query;
+ log::error!("Unknown client error out on request {path} - {err:?}");
Err(proxmox_client::Error::Other(
"failed to perform API request: unknown error",
))
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors
2025-10-24 11:26 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors Maximiliano Sandoval
@ 2025-10-24 12:57 ` Maximiliano Sandoval
0 siblings, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-10-24 12:57 UTC (permalink / raw)
To: pdm-devel
Maximiliano Sandoval <m.sandoval@proxmox.com> writes:
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> server/src/connection.rs | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/server/src/connection.rs b/server/src/connection.rs
> index cf8f788..41469a5 100644
> --- a/server/src/connection.rs
> +++ b/server/src/connection.rs
> @@ -760,6 +760,8 @@ macro_rules! try_request {
> "failed to perform API request: timed out",
> ))
> } else {
> + let path = $path_and_query;
> + log::error!("Unknown client error out on request {path} - {err:?}");
I'll send v2, there is no err in this branch.
> Err(proxmox_client::Error::Other(
> "failed to perform API request: unknown error",
> ))
--
Maximiliano
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pdm-devel] superseded: [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed
2025-10-24 11:26 [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
2025-10-24 11:26 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors Maximiliano Sandoval
@ 2025-10-24 13:01 ` Maximiliano Sandoval
1 sibling, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-10-24 13:01 UTC (permalink / raw)
To: pdm-devel
Maximiliano Sandoval <m.sandoval@proxmox.com> writes:
> The word API was removed in an attempt to make the line as short as
> possible while remaining legible. Additionally, there is already a `api`
> in the journal since the process reporting this would be
> proxmox-datacenter-api[$pid].
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>
> This was added while debugging an error message which lacked enough context to
> debug. The error messages now would look like:
>
> ```
> client error on request /api2/extjs/cluster/resources, trying another remote - client error (SendRequest)
>
> Caused by:
> connection closed before message completed
> ```
Superseded-by: https://lore.proxmox.com/all/20251024130028.1311135-1-m.sandoval@proxmox.com/
--
Maximiliano
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-24 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24 11:26 [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
2025-10-24 11:26 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] connection: add a logging to unknown errors Maximiliano Sandoval
2025-10-24 12:57 ` Maximiliano Sandoval
2025-10-24 13:01 ` [pdm-devel] superseded: [PATCH proxmox-datacenter-manager 1/2] connection: log which API request failed Maximiliano Sandoval
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.